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

46 lines
1.0 KiB
Plaintext
Raw Normal View History

2025-04-12 15:41:48 +03:00
---
sidebar_position: 1
---
import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';
# Get model list
Gets a list of local models
`Function GetModelList(Val URL, Val AdditionalHeaders = "") Export`
| Parameter | CLI option | Type | Required | Description |
|-|-|-|-|-|
| URL | --url | String | ✔ | Ollama server URL |
| AdditionalHeaders | --headers | Map Of KeyAndValue | ✖ | Additional request headers, if necessary |
Returns: Map Of KeyAndValue - Processing result
<br/>
:::tip
Method at API documentation: [List Local Models](https://github.com/ollama/ollama/blob/main/docs/api.md#list-local-models)
:::
<br/>
```bsl title="1C:Enterprise/OneScript code example"
URL = "https://api.athenaeum.digital/ollama";
Token = "10KO..."; // Authorization - not part API Ollama
AdditionalHeaders = New Map;
AdditionalHeaders.Insert("Authorization", StrTemplate("Bearer %1", Token));
Result = OPI_Ollama.GetModelList(URL, AdditionalHeaders);
```