Перейти к содержимому

List Models

GET
/v1/models
curl --request GET \
--url https://api.cloud.agentums.ru/v1/models \
--header 'Authorization: Bearer <token>'

Доступные модели: их id передаётся в /ask параметром model.

Каталог зависит от развёртывания и настроек аккаунта, поэтому зашивать идентификатор в клиент не стоит. Неизвестный или недоступный model в /ask не ошибка — запрос молча уходит на модель по умолчанию.

Successful Response

Media typeapplication/json
ModelList
object
items
Items
Array<object>
ModelInfo
object
available
Available
boolean
default
Default
boolean
id
required
Id
string
label
required
Label
string
provider
required
Provider
string
Example
{
"items": [
{
"available": false,
"default": false
}
]
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
ctx
Context
object
input
Input
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"ctx": {},
"input": "example",
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}