Domain
class yandex_cloud_ml_sdk._chat.completions.function.AsyncChatCompletions
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.
async list(*, timeout=60)
Returns all available models in selected subdomain (completions, embeddings, etc)
|
Parameters |
timeout (float |
|
Return type |
tuple |
__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 |
|
|
Return type |
Model
class yandex_cloud_ml_sdk._chat.completions.model.AsyncChatModel
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.
async run(messages, *, timeout=180)
Executes the model with the provided messages.
|
Parameters |
|
|
Return type |
async run_stream(messages, *, timeout=180)
Executes the model with the provided messages and yields partial results as they become available.
|
Parameters |
|
|
Return type |
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 |
|
|
Return type |
Self |
property uri: str