Yandex Cloud
Search
Contact UsGet started
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • AI for business
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Start testing with double trial credits
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Center for Technologies and Society
    • Yandex Cloud Partner program
  • Pricing
  • Customer Stories
  • Documentation
  • Blog
© 2025 Direct Cursus Technology L.L.C.
Yandex AI Studio
    • About Yandex AI Studio
    • Yandex Workflows
    • Quotas and limits
    • Terms and definitions
  • Compatibility with OpenAI
  • Access management
  • Pricing policy
  • Audit Trails events
  • Public materials
  • Release notes

In this article:

  • class yandex_cloud_ml_sdk._models.text_embeddings.function.AsyncTextEmbeddings
  • class yandex_cloud_ml_sdk._models.text_embeddings.model.AsyncTextEmbeddingsModel

Domain

Written by
Yandex Cloud
Updated at August 25, 2025
  • class yandex_cloud_ml_sdk._models.text_embeddings.function.AsyncTextEmbeddings
  • class yandex_cloud_ml_sdk._models.text_embeddings.model.AsyncTextEmbeddingsModel

class yandexcloudmlsdk.models.textembeddings.function.AsyncTextEmbeddingsclass yandex_cloud_ml_sdk._models.text_embeddings.function.AsyncTextEmbeddings

A class for text embeddings models.

It provides the functionality to call a text embeddings model either by a well-known name or a full URI.

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

Call the specified model for text embeddings. It returns an instance of the specified type of the model.

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 emb://<folder_id>//.

Parameters

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

Model

class yandexcloudmlsdk.models.textembeddings.model.AsyncTextEmbeddingsModelclass yandex_cloud_ml_sdk._models.text_embeddings.model.AsyncTextEmbeddingsModel

A class for text embeddings models, providing configuration, request creation, and execution functionalities.

async run(text, *, timeout=60)

Run the model to generate text embeddings.

Parameters

  • text (str) – the input text for which embeddings are to be generated.
  • timeout – the timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.

Return type

TextEmbeddingsModelResult

async tune_deferred(train_datasets, *, embeddings_tune_type, validation_datasets=Undefined, name=Undefined, description=Undefined, labels=Undefined, seed=Undefined, lr=Undefined, n_samples=Undefined, additional_arguments=Undefined, dimensions=Undefined, tuning_type=Undefined, scheduler=Undefined, optimizer=Undefined, timeout=60)

Initiate a deferred tuning process for the model.

Parameters

  • train_datasets (str | BaseDataset | tuple[str | BaseDataset, float] | Iterable[str | BaseDataset | tuple[str | BaseDataset, float]] | dict[str | BaseDataset, float]) – the dataset objects and/or dataset ids used for training of the model.
  • embeddings_tune_type (Literal['pair', 'triplet']) – the type of tuning to be applied (e.g. pair or triplet).
  • validation_datasets (str | BaseDataset | tuple[str | BaseDataset, float] | Iterable[str | BaseDataset | tuple[str | BaseDataset, float]] | dict[str | BaseDataset, float] | Undefined) – the dataset objects and/or dataset ids used for validation of the model.
  • name (str | Undefined) – the name of the tuning task.
  • description (str | Undefined) – the description of the tuning task.
  • labels (dict[str, str] | Undefined) – labels for the tuning task.
  • seed (int | Undefined) – a random seed for reproducibility.
  • lr (float | Undefined) – a learning rate for tuning.
  • n_samples (int | Undefined) – a number of samples for tuning.
  • additional_arguments (str | Undefined) – additional arguments for tuning.
  • dimensions (Sequence[int] | Undefined) – dimensions for the embeddings.
  • tuning_type (BaseTuningType | Undefined) – a type of tuning to be applied.
  • scheduler (BaseScheduler | Undefined) – a scheduler for tuning.
  • optimizer (BaseOptimizer | Undefined) – an optimizer for tuning.
  • timeout (float) – the timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.

Return type

AsyncTuningTask[AsyncTextEmbeddingsModel]

async tune(train_datasets, *, embeddings_tune_type, validation_datasets=Undefined, name=Undefined, description=Undefined, labels=Undefined, seed=Undefined, lr=Undefined, n_samples=Undefined, additional_arguments=Undefined, dimensions=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

  • train_datasets (str | BaseDataset | tuple[str | BaseDataset, float] | Iterable[str | BaseDataset | tuple[str | BaseDataset, float]] | dict[str | BaseDataset, float]) – the dataset objects and/or dataset ids used for training of the model.
  • embeddings_tune_type (Literal['pair', 'triplet']) – the type of tuning to be applied (e.g. pair or triplet).
  • validation_datasets (str | BaseDataset | tuple[str | BaseDataset, float] | Iterable[str | BaseDataset | tuple[str | BaseDataset, float]] | dict[str | BaseDataset, float] | Undefined) – the dataset objects and/or dataset ids used for validation of the model.
  • name (str | Undefined) – the name of the tuning task.
  • description (str | Undefined) – the description of the tuning task.
  • labels (dict[str, str] | Undefined) – labels for the tuning task.
  • seed (int | Undefined) – a random seed for reproducibility.
  • lr (float | Undefined) – a learning rate for tuning.
  • n_samples (int | Undefined) – a number of samples for tuning.
  • additional_arguments (str | Undefined) – additional arguments for tuning.
  • dimensions (Sequence[int] | Undefined) – dimensions for the embeddings.
  • tuning_type (BaseTuningType | Undefined) – a type of tuning to be applied.
  • scheduler (BaseScheduler | Undefined) – a scheduler for tuning.
  • optimizer (BaseOptimizer | Undefined) – an optimizer for tuning.
  • timeout (float) – the timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.
  • poll_timeout (int) – the maximum time to wait while polling for completion of the tuning task. Defaults to 259200 seconds (72 hours).
  • poll_interval (float) – the interval between polling attempts during the tuning process. Defaults to 60 seconds.

Return type

Self

async attach_tune_deferred(task_id, *, timeout=60)

Attach a deferred tuning task using its task ID.

Parameters

  • task_id (str) – the ID of the deferred tuning task to attach to.
  • timeout (float) – the timeout, or the maximum time to wait for the request to complete in seconds. Defaults to 60 seconds.

Return type

AsyncTuningTask[AsyncTextEmbeddingsModel]

property config: ConfigTypeT

configure()

This method calls the parent class’s configure method and returns the configured model instance.

Return type

Self

property uri: str

Was the article helpful?

© 2025 Direct Cursus Technology L.L.C.