mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-15 15:46:47 +00:00
docs: Update cohere.mdx, Text embedding had incorrect code snippet (#15840)
text embedding code snippet was incorrect.
This commit is contained in:
parent
e6240fecab
commit
6d299a55c0
@ -58,10 +58,8 @@ print(rag.get_relevant_documents("What is cohere ai?"))
|
|||||||
### Text Embedding
|
### Text Embedding
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from langchain_community.chat_models import ChatCohere
|
from langchain_community.embeddings import CohereEmbeddings
|
||||||
from langchain.retrievers import CohereRagRetriever
|
|
||||||
from langchain_core.documents import Document
|
|
||||||
|
|
||||||
rag = CohereRagRetriever(llm=ChatCohere())
|
embeddings = CohereEmbeddings(model="embed-english-light-v3.0")
|
||||||
print(rag.get_relevant_documents("What is cohere ai?"))
|
print(embeddings.embed_documents(["This is a test document."]))
|
||||||
```
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user