Cohere is a Canadian startup that provides natural language processing models that help companies improve human-machine interactions.
Installation and Setup
- Install the Python SDK :
COHERE_API_KEY)
Cohere langchain integrations
| API | description | Endpoint docs | Import | Example usage |
|---|---|---|---|---|
| Chat | Build chat bots | chat | from langchain_cohere import ChatCohere | cohere.ipynb |
| LLM | Generate text | generate | from langchain_cohere.llms import Cohere | cohere.ipynb |
| RAG Retriever | Connect to external data sources | chat + rag | from langchain.retrievers import CohereRagRetriever | cohere.ipynb |
| Text Embedding | Embed strings to vectors | embed | from langchain_cohere import CohereEmbeddings | cohere.ipynb |
| Rerank Retriever | Rank strings based on relevance | rerank | from langchain.retrievers.document_compressors import CohereRerank | cohere.ipynb |