langchain_community.embeddings.gigachat.GigaChatEmbeddings

class langchain_community.embeddings.gigachat.GigaChatEmbeddings[source]

Bases: BaseModel, Embeddings

GigaChat Embeddings models.

Example

Create a new model by parsing and validating input data from keyword arguments.

Raises ValidationError if the input data cannot be parsed to form a valid model.

param access_token: Optional[str] = None

Access token for GigaChat

param auth_url: Optional[str] = None

Auth URL

param base_url: Optional[str] = None

Base API URL

param ca_bundle_file: Optional[str] = None
param cert_file: Optional[str] = None
param credentials: Optional[str] = None

Auth Token

param key_file: Optional[str] = None
param key_file_password: Optional[str] = None
param model: Optional[str] = None

Model name to use.

param password: Optional[str] = None

Password for authenticate

param scope: Optional[str] = None

Permission scope for access token

param timeout: Optional[float] = 600

Timeout for request. By default it works for long requests.

param user: Optional[str] = None

Username for authenticate

param verify_ssl_certs: Optional[bool] = None

Check certificates for all requests

async aembed_documents(texts: List[str]) List[List[float]][source]

Embed documents using a GigaChat embeddings models.

Parameters

texts (List[str]) – The list of texts to embed.

Returns

List of embeddings, one for each text.

Return type

List[List[float]]

async aembed_query(text: str) List[float][source]

Embed a query using a GigaChat embeddings models.

Parameters

text (str) – The text to embed.

Returns

Embeddings for the text.

Return type

List[float]

embed_documents(texts: List[str]) List[List[float]][source]

Embed documents using a GigaChat embeddings models.

Parameters

texts (List[str]) – The list of texts to embed.

Returns

List of embeddings, one for each text.

Return type

List[List[float]]

embed_query(text: str) List[float][source]

Embed a query using a GigaChat embeddings models.

Parameters

text (str) – The text to embed.

Returns

Embeddings for the text.

Return type

List[float]

Examples using GigaChatEmbeddings