mirror of
https://github.com/hwchase17/langchain.git
synced 2025-10-12 04:20:55 +00:00
docs: quickstart retrieval chain for Cohere(API) (#20475)
- **Description:** a description of the change
- **Issue:** the issue # it fixes, if applicable
- **Dependencies:** any dependencies required for this change
- **Twitter handle:** if your PR gets announced, and you'd like a
mention, we'll gladly shout you out!
Description: fixes LangChainDeprecationWarning: The class
`langchain_community.embeddings.cohere.CohereEmbeddings` was deprecated
in langchain-community 0.0.30 and will be removed in 0.2.0. An updated
version of the class exists in the langchain-cohere package and should
be used instead. To use it run `pip install -U langchain-cohere` and
import as `from langchain_cohere import CohereEmbeddings`.

Dependencies : langchain_cohere
Twitter handle: @Mo_Noumaan
This commit is contained in:
committed by
GitHub
parent
d55a365c6c
commit
4dd05791a2
@@ -293,7 +293,7 @@ embeddings = OllamaEmbeddings()
|
|||||||
Make sure you have the `cohere` package installed and the appropriate environment variables set (these are the same as needed for the LLM).
|
Make sure you have the `cohere` package installed and the appropriate environment variables set (these are the same as needed for the LLM).
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from langchain_community.embeddings import CohereEmbeddings
|
from langchain_cohere.embeddings import CohereEmbeddings
|
||||||
|
|
||||||
embeddings = CohereEmbeddings()
|
embeddings = CohereEmbeddings()
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user