mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-09 19:35:20 +03:00
Updated `integrations/embeddings`: fixed titles; added links, descriptions Updated `integrations/providers`.
2.4 KiB
2.4 KiB
In [ ]:
! pip install nlpcloudIn [1]:
from langchain.embeddings import NLPCloudEmbeddingsIn [2]:
import os
os.environ["NLPCLOUD_API_KEY"] = "xxx"
nlpcloud_embd = NLPCloudEmbeddings()In [3]:
text = "This is a test document."In [4]:
query_result = nlpcloud_embd.embed_query(text)In [5]:
doc_result = nlpcloud_embd.embed_documents([text])