6大核心模块(Modules)
示例
Jina

LangChain

Jina Embedding

让我们加载Jina Embedding类.

from langchain.embeddings import JinaEmbeddings
 
embeddings = JinaEmbeddings(jina_auth_token=jina_auth_token, model_name="ViT-B-32::openai")
 
text = "This is a test document."
 
query_result = embeddings.embed_query(text)
 
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 (opens in a new tab).