VoyageAIEmbeddings#
- class langchain_voyageai.embeddings.VoyageAIEmbeddings[source]#
Bases:
BaseModel
,Embeddings
VoyageAIEmbeddings embedding model.
Example
from langchain_voyageai import VoyageAIEmbeddings model = VoyageAIEmbeddings()
Create a new model by parsing and validating input data from keyword arguments.
Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.
self is explicitly positional-only to allow self as a field name.
- param batch_size: int [Required]#
- param model: str [Required]#
- param show_progress_bar: bool = False#
- param truncation: bool | None = None#
- param voyage_api_key: SecretStr [Optional] (alias 'api_key')#
- async aembed_documents(texts: List[str]) List[List[float]] [source]#
Asynchronous Embed search docs.
- Parameters:
texts (List[str]) – List of text to embed.
- Returns:
List of embeddings.
- Return type:
List[List[float]]
- async aembed_query(text: str) List[float] [source]#
Asynchronous Embed query text.
- Parameters:
text (str) – Text to embed.
- Returns:
Embedding.
- Return type:
List[float]