You've already forked OpenIntegrations
mirror of
https://github.com/Bayselonarrend/OpenIntegrations.git
synced 2025-11-27 22:18:36 +02:00
121 lines
2.5 KiB
Plaintext
Vendored
121 lines
2.5 KiB
Plaintext
Vendored
---
|
|
sidebar_position: 1
|
|
description: Get model list and other functions to work with OpenAI in the Open Integration Package, a free open-source integration library for 1C:Enterprise 8, OneScript and CLI
|
|
keywords: [1C, 1С, 1С:Enterprise, 1С:Enterprise 8.3, API, Integration, Services, Exchange, OneScript, CLI, OpenAI]
|
|
---
|
|
|
|
import Tabs from '@theme/Tabs';
|
|
import TabItem from '@theme/TabItem';
|
|
|
|
# Get model list
|
|
Receives a list of available models
|
|
|
|
|
|
|
|
`Function GetModelList(Val URL, Val Token, Val AdditionalHeaders = "") Export`
|
|
|
|
| Parameter | CLI option | Type | Required | Description |
|
|
|-|-|-|-|-|
|
|
| URL | --url | String | ✔ | OpenAI server URL |
|
|
| Token | --token | String | ✔ | OpenAI authorization token |
|
|
| AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
|
|
|
|
|
|
Returns: Map Of KeyAndValue - Processing result
|
|
|
|
<br/>
|
|
|
|
:::tip
|
|
Method at API documentation: [List models](https://platform.openai.com/docs/api-reference/models/list)
|
|
:::
|
|
<br/>
|
|
|
|
|
|
```bsl title="1C:Enterprise/OneScript code example"
|
|
URL = "https://hut.openintegrations.dev/localai/";
|
|
Token = "12We...";
|
|
|
|
Result = OPI_OpenAI.GetModelList(URL, Token);
|
|
```
|
|
|
|
|
|
<Tabs>
|
|
|
|
<TabItem value="bash" label="Bash" default>
|
|
```bash
|
|
oint openai GetModelList \
|
|
--url "https://hut.openintegrations.dev/localai/" \
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
|
|
<TabItem value="bat" label="CMD/Bat" default>
|
|
```batch
|
|
oint openai GetModelList ^
|
|
--url "https://hut.openintegrations.dev/localai/" ^
|
|
--token "***"
|
|
```
|
|
</TabItem>
|
|
</Tabs>
|
|
|
|
|
|
```json title="Result"
|
|
{
|
|
"object": "list",
|
|
"data": [
|
|
{
|
|
"id": "gpt-4",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "moondream2-20250414",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "smolvlm-256m-instruct",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "text-embedding-ada-002",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "whisper-1",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "stablediffusion",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "gpt-4o",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "tts-1",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "silero-vad",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "jina-reranker-v1-base-en",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "minicpm-v-2_6-mmproj-f16.gguf",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "mmproj-SmolVLM-256M-Instruct-Q8_0.gguf",
|
|
"object": "model"
|
|
},
|
|
{
|
|
"id": "moondream2-mmproj-f16-20250414.gguf",
|
|
"object": "model"
|
|
}
|
|
]
|
|
}
|
|
```
|