Files
2023-03-26 19:49:46 -07:00

1.8 KiB

Cohere

Let's load the Cohere Embedding class.

In [1]:
from langchain.embeddings import CohereEmbeddings
In [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 [ ]: