cohere[patch]: add cohere as a partner package (#19049)

Description: adds support for langchain_cohere

---------

Co-authored-by: Harry M <127103098+harry-cohere@users.noreply.github.com>
Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
billytrend-cohere
2024-03-25 15:23:47 -05:00
committed by GitHub
parent 727d5023ce
commit 63343b4987
38 changed files with 2331 additions and 8 deletions

View File

@@ -32,7 +32,7 @@
"The integration lives in the `langchain-community` package. We also need to install the `cohere` package itself. We can install these with:\n",
"\n",
"```bash\n",
"pip install -U langchain-community cohere\n",
"pip install -U langchain-community langchain-cohere\n",
"```\n",
"\n",
"We'll also need to get a [Cohere API key](https://cohere.com/) and set the `COHERE_API_KEY` environment variable:"
@@ -89,7 +89,7 @@
},
"outputs": [],
"source": [
"from langchain_community.chat_models import ChatCohere\n",
"from langchain_cohere import ChatCohere\n",
"from langchain_core.messages import HumanMessage"
]
},

View File

@@ -24,7 +24,7 @@
"The integration lives in the `langchain-community` package. We also need to install the `cohere` package itself. We can install these with:\n",
"\n",
"```bash\n",
"pip install -U langchain-community cohere\n",
"pip install -U langchain-community langchain-cohere\n",
"```\n",
"\n",
"We'll also need to get a [Cohere API key](https://cohere.com/) and set the `COHERE_API_KEY` environment variable:"
@@ -39,7 +39,7 @@
},
"outputs": [
{
"name": "stdin",
"name": "stdout",
"output_type": "stream",
"text": [
" ········\n"
@@ -91,7 +91,7 @@
},
"outputs": [],
"source": [
"from langchain_community.llms import Cohere\n",
"from langchain_cohere import Cohere\n",
"from langchain_core.messages import HumanMessage"
]
},
@@ -255,7 +255,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.1"
"version": "3.11.7"
}
},
"nbformat": 4,

View File

@@ -32,7 +32,7 @@
},
"outputs": [],
"source": [
"from langchain_community.chat_models import ChatCohere\n",
"from langchain_cohere import ChatCohere\n",
"from langchain_community.retrievers import CohereRagRetriever\n",
"from langchain_core.documents import Document"
]

View File

@@ -30,7 +30,7 @@
"metadata": {},
"outputs": [],
"source": [
"from langchain_community.embeddings import CohereEmbeddings"
"from langchain_cohere import CohereEmbeddings"
]
},
{