diff --git a/fern/pages/integrations/cohere-and-langchain/chat-on-langchain.mdx b/fern/pages/integrations/cohere-and-langchain/chat-on-langchain.mdx index cadd73c1..651717bb 100644 --- a/fern/pages/integrations/cohere-and-langchain/chat-on-langchain.mdx +++ b/fern/pages/integrations/cohere-and-langchain/chat-on-langchain.mdx @@ -283,4 +283,14 @@ llm = ChatCohere(cohere_api_key="COHERE_API_KEY", chain = load_summarize_chain(llm, chain_type="stuff") chain.invoke({"input_documents": docs}) +``` + +### Using LangChain on Private Deployments + +You can use LangChain with privately deployed Cohere models. To use it, specify your model deployment URL in the `base_url` parameter. + +```python PYTHON +llm = ChatCohere(base_url=, + cohere_api_key="COHERE_API_KEY", + model="MODEL_NAME") ``` \ No newline at end of file diff --git a/fern/pages/integrations/cohere-and-langchain/embed-on-langchain.mdx b/fern/pages/integrations/cohere-and-langchain/embed-on-langchain.mdx index c341107f..47d2e82d 100644 --- a/fern/pages/integrations/cohere-and-langchain/embed-on-langchain.mdx +++ b/fern/pages/integrations/cohere-and-langchain/embed-on-langchain.mdx @@ -111,3 +111,12 @@ embeddings = BedrockEmbeddings( embeddings.embed_query("This is a content of the document") ``` +### Using LangChain on Private Deployments + +You can use LangChain with privately deployed Cohere models. To use it, specify your model deployment URL in the `base_url` parameter. + +```python PYTHON +llm = CohereEmbeddings(base_url=, + cohere_api_key="COHERE_API_KEY", + model="MODEL_NAME") +``` \ No newline at end of file diff --git a/fern/pages/integrations/cohere-and-langchain/rerank-on-langchain.mdx b/fern/pages/integrations/cohere-and-langchain/rerank-on-langchain.mdx index c62a7eb9..f6efd02f 100644 --- a/fern/pages/integrations/cohere-and-langchain/rerank-on-langchain.mdx +++ b/fern/pages/integrations/cohere-and-langchain/rerank-on-langchain.mdx @@ -84,3 +84,13 @@ citations = docs[-1].metadata['citations'] print("Citations:") print(citations) ``` + +### Using LangChain on Private Deployments + +You can use LangChain with privately deployed Cohere models. To use it, specify your model deployment URL in the `base_url` parameter. + +```python PYTHON +llm = CohereRerank(base_url=, + cohere_api_key="COHERE_API_KEY", + model="MODEL_NAME") +``` \ No newline at end of file