Skip to main content

Jina

Let’s load the Jina Embedding class.

from langchain_community.embeddings import JinaEmbeddings
embeddings = JinaEmbeddings(
jina_api_key="jina_*", model_name="jina-embeddings-v2-base-en"
)
text = "This is a test document."
query_result = embeddings.embed_query(text)
print(query_result)
doc_result = embeddings.embed_documents([text])
print(doc_result)