mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-06 18:05:25 +03:00
1.8 KiB
1.8 KiB
In [1]:
from langchain.embeddings import CohereEmbeddingsIn [2]:
embeddings = CohereEmbeddings(cohere_api_key=cohere_api_key)In [3]:
text = "This is a test document."In [4]:
query_result = embeddings.embed_query(text)In [5]:
doc_result = embeddings.embed_documents([text])In [ ]: