JinaEmbeddings#
- class langchain_community.embeddings.jina.JinaEmbeddings[source]#
Bases:
BaseModel
,Embeddings
Jina embedding models.
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 jina_api_key: SecretStr | None = None#
- param model_name: str = 'jina-embeddings-v2-base-en'#
- 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]#
Call out to Jinaβs embedding endpoint. :param texts: The list of texts to embed.
- Returns:
List of embeddings, one for each text.
- Parameters:
texts (List[str])
- Return type:
List[List[float]]
Examples using JinaEmbeddings