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 if the input data cannot be parsed to form a valid model.
- 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