Skip to main content
Open In ColabOpen on GitHub

Clova Embeddings

Clova 提供嵌入服务

本示例介绍了如何使用LangChain与Clova推理进行文本嵌入的交互。

import os

os.environ["CLOVA_EMB_API_KEY"] = ""
os.environ["CLOVA_EMB_APIGW_API_KEY"] = ""
os.environ["CLOVA_EMB_APP_ID"] = ""
from langchain_community.embeddings import ClovaEmbeddings
API Reference:ClovaEmbeddings
embeddings = ClovaEmbeddings()
query_text = "This is a test query."
query_result = embeddings.embed_query(query_text)
document_text = ["This is a test doc1.", "This is a test doc2."]
document_result = embeddings.embed_documents(document_text)

这个页面有帮助吗?