Domain
class yandex_cloud_ml_sdk._models.completions.function.Completions
__call__(model_name, *, model_version='latest')
Create a model object to call for generating completions.
This method constructs the URI for the model based on the provided name and version. If the name contains ://, it is treated as a full URI. Otherwise, it looks up the model name in the well-known names dictionary. But after this, in any case, we construct a URI in the form gpt://<folder_id>/
|
Parameters |
|
|
Return type |
Model
class yandex_cloud_ml_sdk._models.completions.model.GPTModel
A class for GPT models providing various functionalities including tuning, and batch processing.
run(messages, *, timeout=180)
Executes the model with the provided messages.
|
Parameters |
|
|
Return type |
run_stream(messages, *, timeout=180)
Executes the model with the provided messages and yields partial results as they become available.
|
Parameters |
|
|
Return type |
run_deferred(messages, *, timeout=60)
Initiates a deferred execution of the model with the provided messages.
|
Parameters |
|
|
Return type |
attach_deferred(operation_id, timeout=60)
Attaches to an ongoing deferred operation using its operation id.
|
Parameters |
|
|
Return type |
tokenize(messages, *, timeout=60)
Tokenizes the provided messages into a tuple of tokens.
|
Parameters |
|
|
Return type |
tune_deferred(train_datasets, *, validation_datasets=Undefined, name=Undefined, description=Undefined, labels=Undefined, seed=Undefined, lr=Undefined, n_samples=Undefined, additional_arguments=Undefined, tuning_type=Undefined, scheduler=Undefined, optimizer=Undefined, timeout=60)
Initiate a deferred tuning process for the model.
|
Parameters |
|
|
Return type |
tune(train_datasets, *, validation_datasets=Undefined, name=Undefined, description=Undefined, labels=Undefined, seed=Undefined, lr=Undefined, n_samples=Undefined, additional_arguments=Undefined, tuning_type=Undefined, scheduler=Undefined, optimizer=Undefined, timeout=60, poll_timeout=259200, poll_interval=60)
Tune the model with the specified training datasets and parameters.
|
Parameters |
|
|
Return type |
attach_tune_deferred(task_id, *, timeout=60)
Attach a deferred tuning task using its task id.
|
Parameters |
|
|
Return type |
property batch: BatchSubdomainTypeT
property config: ConfigTypeT
configure(*, temperature=Undefined, max_tokens=Undefined, reasoning_mode=Undefined, response_format=Undefined, tools=Undefined, parallel_tool_calls=Undefined, tool_choice=Undefined)
Configures the model with specified parameters.
|
Parameters |
|
|
Returns |
new model instance with provided configuration. |
|
Return type |
langchain(model_type='chat', timeout=60)
Initializes a langchain model based on the specified model type.
|
Parameters |
|
|
Return type |
BaseYandexLanguageModel |
property uri: str