Run types
class yandex_cloud_ml_sdk._runs.status.BaseRunStatus
Class for run status enumerations.
property is_failed: bool
Check if operation execution failed.
property is_finished: bool
Check if operation execution finished.
property is_running: bool
Check if operation execution is still in progress.
property is_succeeded: bool
Check if operation execution completed successfully.
property status_name: str
Get operation execution status name.
class yandex_cloud_ml_sdk._runs.status.RunStatus
Enumeration of possible run statuses.
UNKNOWN = -1
Unknown status (-1)
RUN_STATUS_UNSPECIFIED = 0
Status not specified
PENDING = 1
Status not specified
IN_PROGRESS = 2
Run is in progress
FAILED = 3
Run has failed
COMPLETED = 4
Run completed successfully
TOOL_CALLS = 5
Run requires tool calls
property is_running: bool
Check if operation execution is still in progress.
property is_succeeded: bool
Check if operation execution completed successfully.
property is_failed: bool
Check if operation execution failed.
__new__(value)
class yandex_cloud_ml_sdk._runs.status.StreamEvent
Enumeration of possible stream events during run execution.
UNKNOWN = -1
Unknown event type (-1)
EVENT_TYPE_UNSPECIFIED = 0
Event type not specified
PARTIAL_MESSAGE = 1
Partial message content
ERROR = 2
Error occurred
DONE = 3
Execution completed
TOOL_CALLS = 4
Tool calls required
property is_running: bool
Check if operation execution is still in progress.
property is_succeeded: bool
Check if operation execution completed successfully.
property is_failed: bool
Check if operation execution failed.
__new__(value)
class yandex_cloud_ml_sdk._runs.result.RunResult
RunResult(status: ‘StatusTypeT’, error: ‘str | None’, tool_calls: ‘ToolCallList[ProtoAssistantToolCallList, ToolCallTypeT] | None’, _message: ‘MessageTypeT | None’, usage: ‘Usage | None’)
Token usage statistics
property citations: tuple
Return citations from the assistant’s message if present.
Citations refer to references to external sources or documents that the model used to generate its response. These typically include: - Source document IDs - Document titles or descriptions - Relevant snippets or passages Returns None if no citations are present in the message.
property is_failed: bool
Check if operation execution failed.
property is_finished: bool
Check if operation execution finished.
property is_running: bool
Check if operation execution is still in progress.
property is_succeeded: bool
Check if operation execution completed successfully.
property message: MessageTypeT | None
Get the message result of the run. If run has failed this property raise error value.
property parts: tuple
Get message parts if available, otherwise return nothing.
property status_name: str
Get operation execution status name.
Get the text content of the message if available, otherwise return nothing.
status: StatusTypeT
Run status
Error message if run failed
tool_calls: ToolCallList[ToolCallList, ToolCallTypeT] | None
List of tool calls if any
class yandex_cloud_ml_sdk._runs.result.RunStreamEvent
Represents a streaming event in a run execution process.
This class encapsulates all possible events that can occur during streaming execution of a run, including: - Partial and completed messages - Errors that may occur during execution - Tool calls initiated by the model
property is_failed: bool
Check if operation execution failed.
property is_finished: bool
Check if operation execution finished.
property is_running: bool
Check if operation execution is still in progress.
property is_succeeded: bool
Check if operation execution completed successfully.
property message: MessageTypeT | None
Get the message result of the run. If run has failed this property raise error value.
property parts: tuple
Get message parts if available, otherwise return nothing.
property status_name: str
Get operation execution status name.
Get the text content of the message if available, otherwise return nothing.
status: StatusTypeT
Run status
Error message if run failed
tool_calls: ToolCallList[ToolCallList, ToolCallTypeT] | None
List of tool calls if any