Personal tools
Skip to content. | Skip to navigation
Langchain-Cohere This package contains the LangChain integrations for Cohere. Cohere empowers every developer and enterprise to build amazing products and capture true business value with language AI. Installation Install the langchain-cohere package: pip install langchain-cohere Get a Cohere API key and set it as an environment variable (COHERE_API_KEY) Migration from langchain-community Cohere's integrations used to be part of the langchain-community package, but since version 0.0.30 the integration in langchain-community has been deprecated in favour langchain-cohere. The two steps to migrate are: Import from langchain_cohere instead of langchain_community, for example: from langchain_community.chat_models import ChatCohere -> from langchain_cohere import ChatCohere from langchain_community.retrievers import CohereRagRetriever -> from langchain_cohere import CohereRagRetriever from langchain.embeddings import CohereEmbeddings -> from langchain_cohere import CohereEmbeddings
🦜️🧑🤝🧑 LangChain Community What is it? LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.
🦜🍎️ LangChain Core What is it? LangChain Core contains the base abstractions that power the rest of the LangChain ecosystem. These abstractions are designed to be as modular and simple as possible. Examples of these abstractions include those for language models, document loaders, embedding models, vectorstores, retrievers, and more. The benefit of having these abstractions is that any provider can implement the required interface and then easily be used in the rest of the LangChain ecosystem. For full documentation see the API reference. 1️⃣ Core Interface: Runnables The concept of a Runnable is central to LangChain Core – it is the interface that most LangChain Core components implement, giving them a common invocation interface (invoke, batch, stream, etc.) built-in utilities for retries, fallbacks, schemas and runtime configurability easy deployment with LangServe
langchain-deepseek This package contains the LangChain integration with the DeepSeek API Installation pip install -U langchain-deepseek And you should configure credentials by setting the following environment variables: DEEPSEEK_API_KEY Chat Models ChatDeepSeek class exposes chat models from DeepSeek. from langchain_deepseek import ChatDeepSeek llm = ChatDeepSeek(model="deepseek-chat") llm.invoke("Sing a ballad of LangChain.")
langchain-elasticsearch This package contains the LangChain integration with Elasticsearch. Installation pip install -U langchain-elasticsearch Elasticsearch setup Elastic Cloud You need a running Elasticsearch deployment. The easiest way to start one is through Elastic Cloud. You can sign up for a free trial. Create a deployment Get your Cloud ID: In the Elastic Cloud console, click "Manage" next to your deployment Copy the Cloud ID and paste it into the es_cloud_id parameter below Create an API key: In the Elastic Cloud console, click "Open" next to your deployment In the left-hand side menu, go to "Stack Management", then to "API Keys" Click "Create API key" Enter a name for the API key and click "Create" Copy the API key and paste it into the es_api_key parameter below Alternatively, you can run Elasticsearch via Docker as described in the docs. Usage ElasticsearchStore The ElasticsearchStore class exposes Elasticsearch as a vector store. from langchain_elasticsearch impor
LangChain-Fireworks This is the partner package for tying Fireworks.ai and LangChain. Fireworks really strive to provide good support for LangChain use cases, so if you run into any issues please let us know. You can reach out to us in our Discord channel Installation To use the langchain-fireworks package, follow these installation steps: pip install langchain-fireworks Basic usage Setting up Sign in to Fireworks AI to obtain an API Key to access the models, and make sure it is set as the FIREWORKS_API_KEY environment variable. Once you've signed in and obtained an API key, follow these steps to set the FIREWORKS_API_KEY environment variable: Linux/macOS: Open your terminal and execute the following command: export FIREWORKS_API_KEY='your_api_key' Note: To make this environment variable persistent across terminal sessions, add the above line to your ~/.bashrc, ~/.bash_profile, or ~/.zshrc file. Windows: For Command Prompt, use: set FIREWORKS_API_KEY=your_api_key Set up your
Langchain Google Calendar Tools This repo walks through connecting to the Google Calendar API. Installation pip install langchain-google-calendar-tools For local development: pip install -e . How to use Create a Google Cloud project and enable Google Calendar API. To get Oauth credentials for the Desktop app, please refer https:/developers.google.com/calendar/api/guides/overview for detail. Download the credentials file to ./notebooks and rename it to credentials.json. If you want to keep its original file name, please replace the value of client_secrets_file in demo.ipynb with the valid path which points to the credentials file. Run this notebook to perform the listed functions Limitations Due to the short development time, some of the following parts have not been completed and will be improved in the future: Timezone: Currently being fixed to Vietnam's timezone, it will be taken from the user's Calendar or the system in the future Update recurring events: has not been implemen
langchain-google-community This package contains the LangChain integrations for Google products that are not part of langchain-google-vertexai or langchain-google-genai packages. Installation pip install -U langchain-google-community
langchain-google-vertexai This package contains the LangChain integrations for Google Cloud generative models. Installation pip install -U langchain-google-vertexai Chat Models ChatVertexAI class exposes models such as gemini-pro and chat-bison. To use, you should have Google Cloud project with APIs enabled, and configured credentials. Initialize the model as: from langchain_google_vertexai import ChatVertexAI llm = ChatVertexAI(model_name="gemini-pro") llm.invoke("Sing a ballad of LangChain.") You can use other models, e.g. chat-bison: from langchain_google_vertexai import ChatVertexAI llm = ChatVertexAI(model_name="chat-bison", temperature=0.3) llm.invoke("Sing a ballad of LangChain.") Multimodal inputs Gemini vision model supports image inputs when providing a single chat message. Example: from langchain_core.messages import HumanMessage from langchain_google_vertexai import ChatVertexAI llm = ChatVertexAI(model_name="gemini-pro-vision") message = HumanMessage( c
LangChain Graph Retriever LangChain Graph Retriever is a Python library that supports traversing a document graph on top of vector-based similarity search. It works seamlessly with LangChain's retriever framework and supports various graph traversal strategies for efficient document discovery. Features Vector Search: Perform similarity searches using vector embeddings. Graph Traversal: Apply traversal strategies such as breadth-first (Eager) or Maximal Marginal Relevance (MMR) to explore document relationships. Customizable Strategies: Easily extend and configure traversal strategies to meet your specific use case. Multiple Adapters: Support for various vector stores, including AstraDB, Cassandra, Chroma, OpenSearch, and in-memory storage. Synchronous and Asynchronous Retrieval: Supports both sync and async workflows for flexibility in different applications. Installation Install the library via pip: pip install langchain-graph-retriever Getting Started Here is an example of how to