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 if the input data cannot be parsed to form a valid model.
- param jina_api_key: SecretStr | None = None#
- Constraints:
type = string
writeOnly = True
format = password
- 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