Yandex Cloud
Поиск
Связаться с намиПодключиться
  • Истории успеха
  • Документация
  • Блог
  • Все сервисы
  • Статус работы сервисов
    • Доступны в регионе
    • Инфраструктура и сеть
    • Платформа данных
    • Контейнеры
    • Инструменты разработчика
    • Бессерверные вычисления
    • Безопасность
    • Мониторинг и управление ресурсами
    • ИИ для бизнеса
    • Бизнес-инструменты
  • Все решения
    • По отраслям
    • По типу задач
    • Экономика платформы
    • Безопасность
    • Техническая поддержка
    • Каталог партнёров
    • Обучение и сертификация
    • Облако для стартапов
    • Облако для крупного бизнеса
    • Центр технологий для общества
    • Партнёрская программа
    • Поддержка IT-бизнеса
    • Облако для фрилансеров
    • Обучение и сертификация
    • Блог
    • Документация
    • Мероприятия и вебинары
    • Контакты, чаты и сообщества
    • Идеи
    • Тарифы Yandex Cloud
    • Промоакции и free tier
    • Правила тарификации
  • Истории успеха
  • Документация
  • Блог
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»
Yandex AI Studio
  • Начало работы с Model Gallery
    • О сервисе Yandex AI Studio
    • Yandex Workflows
    • Квоты и лимиты
    • Термины и определения
  • Переход с AI Assistant API на Responses API
  • Совместимость с OpenAI
    • О Yandex Cloud ML SDK
      • Overview
        • Overview
        • Models domain
        • Assistants domain
        • Tools domain
        • Files domain
        • Threads domain
        • Runs domain
        • Search indexes domain
        • Search API domain
        • Datasets domain
        • Tuning domain
        • Batch domain
        • Chat domain
      • Authentication
      • Request retries
  • Управление доступом
  • Правила тарификации
  • Аудитные логи Audit Trails
  • Публичные материалы
  • История изменений

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

  • class yandex_cloud_ml_sdk._runs.domain.Runs
  • class yandex_cloud_ml_sdk._runs.run.Run
  1. Yandex Cloud ML SDK
  2. Справочник SDK (англ.)
  3. SDK
  4. Runs domain

Runs domain

Статья создана
Yandex Cloud
Обновлена 7 ноября 2025 г.
  • class yandex_cloud_ml_sdk._runs.domain.Runs
  • class yandex_cloud_ml_sdk._runs.run.Run

class yandexcloudmlsdk.runs.domain.Runsclass yandex_cloud_ml_sdk._runs.domain.Runs

Class for Runs operations. Provides core functionality for managing assistant execution in streams.

For usage examples see runs example.

get(run_id, *, timeout=60)

Get a run by ID.

Parameters

  • run_id (str) – Run ID
  • timeout (float) – The timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.

Return type

Run

get_last_by_thread(thread, *, timeout=60)

Get the last run for a thread.

Parameters

  • thread (str | BaseThread) – Thread ID or instance
  • timeout (float) – The timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.

Return type

Run

list(*, page_size=Undefined, timeout=60)

List runs. Returns an async iterator to retrieve all runs.

Parameters

  • page_size (int | Undefined) – Number of items per page. Larger values reduce the number of network calls but increase memory consumption per request.
  • timeout (float) – The timeout, or the maximum time to wait for each network request to complete in seconds. Defaults to 60 seconds. This affects the network behavior but not the total time for iteration.

Return type

Iterator[Run]

class yandexcloudmlsdk.runs.run.Runclass yandex_cloud_ml_sdk._runs.run.Run

Synchronous implementation of Run operations.

Represents a server-side Run object that has been started by an assistant on a specific thread. It implements the Operation interface, allowing you to monitor the Run’s execution on the server, track its progress, and retrieve its results.

The Run provides synchronous methods to: - Listen to real-time events from the running assistant - Submit tool execution results back to continue the conversation - Monitor the Run’s status and retrieve final results - Handle the complete lifecycle of an assistant conversation session

listen(*, events_start_idx=0, timeout=60)

Listen to run events stream.

Parameters

  • events_start_idx (int) – Starting event index
  • timeout (float) – The timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.

Return type

Iterator[RunStreamEvent[ToolCall]]

submit_tool_results(tool_results, *, timeout=60)

Submit tool execution results to continue the run.

Parameters

  • tool_results (FunctionResultDict | Iterable[FunctionResultDict]) – Tool call results to submit
  • timeout (float) – The timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.

Return type

None

cancel(*, timeout=60)

Parameters

timeout (float)

Return type

None

property custom_max_prompt_tokens: int | None

Get max prompt tokens from truncation options if set.

get_result(*, timeout=60)

Parameters

timeout (float)

Return type

AnyResultTypeT_co

get_status(*, timeout=60)

Parameters

timeout (float)

Return type

OperationStatusTypeT

wait(*, timeout=60, poll_timeout=None, poll_interval=None)

Parameters

  • timeout (float)
  • poll_timeout (int | None)
  • poll_interval (float | None)

Return type

AnyResultTypeT_co

id: str

Unique run identifier

assistant_id: str

ID of the assistant used

thread_id: str

ID of the thread used

created_by: str

Creator of the run

created_at: datetime

Creation timestamp

labels: dict[str, str] | None

Optional metadata labels

custom_temperature: float | None

Custom temperature setting

custom_max_tokens: int | None

Custom max tokens setting

custom_prompt_truncation_options: PromptTruncationOptions | None

Custom prompt truncation options

custom_response_format: ResponseType | None

Custom response format

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

Предыдущая
Threads domain
Следующая
Search indexes domain
Проект Яндекса
© 2025 ТОО «Облачные Сервисы Казахстан»