1
0
mirror of https://github.com/Bayselonarrend/OpenIntegrations.git synced 2025-11-29 22:27:42 +02:00
Files
OpenIntegrations/docs/en/md/OpenAI/Models-management/Get-model-list.mdx

121 lines
2.5 KiB
Plaintext
Raw Normal View History

2025-06-13 08:51:43 +03:00
---
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"
2025-10-21 11:36:43 +03:00
URL = "https://hut.openintegrations.dev/localai/";
Token = "12We...";
2025-06-13 08:51:43 +03:00
Result = OPI_OpenAI.GetModelList(URL, Token);
```
2025-06-18 21:53:54 +03:00
<Tabs>
<TabItem value="bash" label="Bash" default>
```bash
oint openai GetModelList \
2025-07-04 23:24:42 +03:00
--url "https://hut.openintegrations.dev/localai/" \
2025-06-18 21:53:54 +03:00
--token "***"
```
</TabItem>
<TabItem value="bat" label="CMD/Bat" default>
```batch
oint openai GetModelList ^
2025-07-04 23:24:42 +03:00
--url "https://hut.openintegrations.dev/localai/" ^
2025-06-18 21:53:54 +03:00
--token "***"
```
</TabItem>
</Tabs>
2025-06-13 08:51:43 +03:00
2025-06-17 16:20:59 +03:00
```json title="Result"
{
2025-09-12 20:23:31 +03:00
"object": "list",
"data": [
2025-06-17 16:20:59 +03:00
{
2025-09-16 09:07:33 +03:00
"id": "gpt-4",
2025-09-12 20:23:31 +03:00
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-16 09:07:33 +03:00
"id": "moondream2-20250414",
2025-09-12 20:23:31 +03:00
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-15 13:14:53 +03:00
"id": "smolvlm-256m-instruct",
2025-09-12 20:23:31 +03:00
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-15 13:14:53 +03:00
"id": "text-embedding-ada-002",
2025-09-12 20:23:31 +03:00
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-15 13:14:53 +03:00
"id": "whisper-1",
2025-09-12 20:23:31 +03:00
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-15 13:14:53 +03:00
"id": "stablediffusion",
2025-09-12 20:23:31 +03:00
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-12 20:23:31 +03:00
"id": "gpt-4o",
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-12 20:23:31 +03:00
"id": "tts-1",
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-15 13:14:53 +03:00
"id": "silero-vad",
2025-09-12 20:23:31 +03:00
"object": "model"
2025-06-17 16:20:59 +03:00
},
2025-09-14 15:36:38 +03:00
{
2025-09-16 09:07:33 +03:00
"id": "jina-reranker-v1-base-en",
2025-09-14 15:36:38 +03:00
"object": "model"
},
2025-06-17 16:20:59 +03:00
{
2025-09-12 20:23:31 +03:00
"id": "minicpm-v-2_6-mmproj-f16.gguf",
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-12 20:23:31 +03:00
"id": "mmproj-SmolVLM-256M-Instruct-Q8_0.gguf",
"object": "model"
2025-06-17 16:20:59 +03:00
},
{
2025-09-12 20:23:31 +03:00
"id": "moondream2-mmproj-f16-20250414.gguf",
"object": "model"
}
]
}
2025-06-17 16:20:59 +03:00
```