AwaEmbeddings#
- class langchain_community.embeddings.awa.AwaEmbeddings[source]#
Bases:
BaseModel
,Embeddings
Embedding documents and queries with Awa DB.
- client#
The AwaEmbedding client.
- model#
The name of the model used for embedding. Default is βall-mpnet-base-v2β.
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 model: str = 'all-mpnet-base-v2'#
- async aembed_documents(texts: list[str]) list[list[float]] #
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] #
Asynchronous Embed query text.
- Parameters:
text (str) β Text to embed.
- Returns:
Embedding.
- Return type:
list[float]
- embed_documents(texts: List[str]) List[List[float]] [source]#
Embed a list of documents using AwaEmbedding.
- Parameters:
texts (List[str]) β The list of texts need to be embedded
- Returns:
List of embeddings, one for each text.
- Return type:
List[List[float]]
Examples using AwaEmbeddings