Files
2023-03-28 08:16:17 -07:00

2.0 KiB

Jina

Let's load the Jina Embedding class.

In [2]:
from langchain.embeddings import JinaEmbeddings
In [ ]:
embeddings = JinaEmbeddings(jina_auth_token=jina_auth_token, model_name="ViT-B-32::openai")
In [ ]:
text = "This is a test document."
In [ ]:
query_result = embeddings.embed_query(text)
In [ ]:
doc_result = embeddings.embed_documents([text])

In the above example, ViT-B-32::openai, OpenAI's pretrained ViT-B-32 model is used. For a full list of models, see here.

In [ ]: