Yandex Cloud
Поиск
Связаться с намиПопробовать бесплатно
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
  • Marketplace
    • Популярные
    • Инфраструктура и сеть
    • Платформа данных
    • Искусственный интеллект
    • Безопасность
    • Инструменты DevOps
    • Бессерверные вычисления
    • Управление ресурсами
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Облако для интеграторов
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Контент-программа
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Калькулятор цен
    • Тарифы
    • Акции и free tier
  • Истории успеха
  • Документация
  • Блог
Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»
Yandex AI Studio
  • О сервисе Yandex AI Studio
  • Начало работы с Model Gallery
  • Yandex Workflows
  • Переход с AI Assistant API на Responses API
  • Совместимость с OpenAI
  • Квоты и лимиты
  • Правила тарификации
  • Управление доступом
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений
  • Термины и определения

В этой статье:

  • class yandex_ai_studio_sdk._chat.completions.function.ChatCompletions
  • class yandex_ai_studio_sdk._chat.completions.model.ChatModel

Domain

Статья создана
Yandex Cloud
Обновлена 28 января 2026 г.
  • class yandex_ai_studio_sdk._chat.completions.function.ChatCompletions
  • class yandex_ai_studio_sdk._chat.completions.model.ChatModel

class yandexaistudiosdk.chat.completions.function.ChatCompletionsclass yandex_ai_studio_sdk._chat.completions.function.ChatCompletions

A class for working with chat completions models.

This class provides the core functionality for creating chat model instances and managing completions. It handles model URI construction and provides methods for listing available models.

list(*, timeout=60, filters=None)

Returns all available models in selected subdomain (completions, embeddings, etc)

Parameters

  • timeout (float) – The timeout, or the maximum time to wait for the request to complete in seconds.
  • filters (ModelFilter | None) – Optional dict with filters, where keys are model attribute names and values are the desired values.

Return type

tuple[ChatModel, …]

>>> filters = {'owner': 'alice', 'version': 'v2', 'fine_tuned': True}

__call__(model_name, *, model_version='latest')

Create a model instance in selected chat subdomain (completions, embeddings, etc)

Constructs the model URI based on the provided name and version. If the name contains ‘://’, it is treated as a full URI. Otherwise constructs a URI in the form ‘gpt://<folder_id>//’.

Parameters

  • model_name (str) – The name or URI of the model.
  • model_version (str) – The version of the model to use. Defaults to ‘latest’.

Return type

ModelTypeT

Model

class yandexaistudiosdk.chat.completions.model.ChatModelclass yandex_ai_studio_sdk._chat.completions.model.ChatModel

A class for working with chat models providing inference functionality.

This class provides the foundation for chat model implementations, handling configuration, request building, and response processing.

run(messages, *, timeout=180)

Executes the model with the provided messages.

Parameters

  • messages (TextMessage | TextMessageDict | TextMessageProtocol | str | ChatFunctionResultMessageDict | FunctionResultMessageDict | Iterable[TextMessage | TextMessageDict | TextMessageProtocol | str | FunctionResultMessageDict] | MultimodalMessageDict | Iterable[TextMessage | TextMessageDict | TextMessageProtocol | str | ChatFunctionResultMessageDict | FunctionResultMessageDict | Iterable[TextMessage | TextMessageDict | TextMessageProtocol | str | FunctionResultMessageDict] | MultimodalMessageDict]) – The input messages to process. Could be a string, a dictionary, or a result object. Read more about other possible message types in the corresponding documentation.
  • timeout – The timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 180 seconds.

Return type

ChatModelResult[ToolCall]

run_stream(messages, *, timeout=180)

Executes the model with the provided messages and yields partial results as they become available.

Parameters

  • messages (TextMessage | TextMessageDict | TextMessageProtocol | str | ChatFunctionResultMessageDict | FunctionResultMessageDict | Iterable[TextMessage | TextMessageDict | TextMessageProtocol | str | FunctionResultMessageDict] | MultimodalMessageDict | Iterable[TextMessage | TextMessageDict | TextMessageProtocol | str | ChatFunctionResultMessageDict | FunctionResultMessageDict | Iterable[TextMessage | TextMessageDict | TextMessageProtocol | str | FunctionResultMessageDict] | MultimodalMessageDict]) – The input messages to process.
  • timeout – The timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 180 seconds.

Return type

Iterator[ChatModelResult[ToolCall]]

property config: ConfigTypeT

configure(*, temperature=Undefined, max_tokens=Undefined, reasoning_mode=Undefined, response_format=Undefined, tools=Undefined, parallel_tool_calls=Undefined, tool_choice=Undefined, extra_query=Undefined)

Configure the model with specified parameters.

Parameters

  • temperature (UndefinedOr[float] | None) – Sampling temperature (0-1). Higher values produce more random results.
  • max_tokens (UndefinedOr[int] | None) – Maximum number of tokens to generate in the response.
  • reasoning_mode (UndefinedOr[ChatReasoningModeType] | None) – Reasoning mode for internal processing before responding.
  • response_format (UndefinedOr[ResponseType] | None) – Format of the response (JsonSchema, JSON string, or pydantic model). See structured output documentation_BaseChatModel_URL.
  • tools (UndefinedOr[Sequence[CompletionTool] | CompletionTool]) – Tools available for completion. Can be a sequence or single tool.
  • parallel_tool_calls (UndefinedOr[bool]) – Whether to allow parallel tool calls. Defaults to ‘true’.
  • tool_choice (UndefinedOr[ToolChoiceType]) – Strategy for tool selection. There are several ways to configure tool_choice for query processing: - no tools to call (tool_choice='none'); - required to call any tool (tool_choice='required'); - call a specific tool (tool_choice={'type': 'function', 'function': {'name': 'another_calculator'}} or directly passing a tool object).
  • extra_query (UndefinedOr[QueryType]) – Additional experimental model parameters.

Return type

Self

property fine_tuned: bool | None

property name: str | None

property owner: str | None

property uri: str

property version: str | None

Была ли статья полезна?

Создавайте контент и получайте гранты!Готовы написать своё руководство? Участвуйте в контент-программе и получайте гранты на работу с облачными сервисами!
Подробнее о программе
Проект Яндекса
© 2026 ООО «Яндекс.Облако»