mirror of
https://github.com/hwchase17/langchain.git
synced 2025-08-15 07:36:08 +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
|
||||
|
||||
```python
|
||||
from langchain_community.chat_models import ChatCohere
|
||||
from langchain.retrievers import CohereRagRetriever
|
||||
from langchain_core.documents import Document
|
||||
from langchain_community.embeddings import CohereEmbeddings
|
||||
|
||||
rag = CohereRagRetriever(llm=ChatCohere())
|
||||
print(rag.get_relevant_documents("What is cohere ai?"))
|
||||
embeddings = CohereEmbeddings(model="embed-english-light-v3.0")
|
||||
print(embeddings.embed_documents(["This is a test document."]))
|
||||
```
|
||||
|
Loading…
Reference in New Issue
Block a user