Reference documentation for the langchain-community package.
Cache that stores things in memory.
SQLite table for full LLM Cache (all generations).
Cache that uses SQAlchemy as a backend.
Cache that uses SQLite as a backend.
Cache that uses Upstash Redis as a backend.
Cache that uses Redis as a backend. Allows to use a sync redis.Redis client.
Cache that uses Redis as a backend. Allows to use an
async redis.asyncio.Redis client.
Cache that uses Redis as a vector-store backend.
Cache that uses GPTCache as a backend.
Cache that uses Momento as a backend. See https://gomomento.com/
Cache that uses Cassandra / Astra DB as a backend.
Example:
.. code-block:: python
import cassio
from langchain_community.cache import CassandraCache
from langchain_cor
Cache that uses Cassandra as a vector-store backend for semantic (i.e. similarity-based) lookup.
Example:
.. code-block:: python
import cassio
from langchain_community.cache im
SQLite table for full LLM Cache (all generations).
Cache that uses SQAlchemy as a backend.
Cache that uses Cosmos DB Mongo vCore vector-store backend
Cache that uses Cosmos DB NoSQL backend
Cache that uses OpenSearch vector store backend
Cache that uses Memcached backend through pymemcache client lib
Parse an output that is one of sets of values.
Parse an output as the Json object.
Parse an output as the element of the Json object.
Parse an output as a pydantic object.
Parse an output as an attribute of a pydantic object.
Parse the output of an LLM call using Guardrails.
Wrapper for SceneXplain API.
In order to set this up, you need API key for the SceneXplain API. You can obtain a key by following the steps below.
Base class for all components.
Class for a task.
Component class for a list.
Component class for a member.
Component class for a team.
Component class for a space.
Wrapper for Clickup API.
Wrapper for Zapier NLA.
Full docs here: https://nla.zapier.com/start/
This wrapper supports both API Key and OAuth Credential auth methods. API Key is the fastest way to get started using this wrapp
SQLAlchemy wrapper around a database.
Wrapper for SerpApi's Google Scholar API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the SerpApi.com python package: https://serpapi.com/inte
Wrapper around the DataForSeo API.
Wrapper around the Brave search engine.
Access to the TensorFlow Datasets.
The Current implementation can work only with datasets that fit in a memory.
TensorFlow Datasets is a collection of datasets ready to use, with TensorFlow
or oth
Wrapper around the Wikidata API.
To use, you should have the wikibase-rest-api-client and
mediawikiapi python packages installed.
This wrapper will use the Wikibase APIs to conduct searches
Wrapper for Wolfram Alpha.
Docs for using:
Context manager to hide prints.
Wrapper around SerpAPI.
To use, you should have the google-search-results python package installed,
and the environment variable SERPAPI_API_KEY set with your API key, or pass
`serpapi_api_ke
Jira OAuth2 token.
Jira OAuth2.
Wrapper for Jira API. You can connect to Jira with either an API token or OAuth2.
Wrapper for Infobip API for messaging.
Wrapper around the Serper.dev Google Search API.
You can create a free API key at https://serper.dev.
To use, you should have the environment variable SERPER_API_KEY
set with your API key, or pa
Messaging Client using Twilio.
To use, you should have the twilio python package installed,
and the environment variables TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and
TWILIO_FROM_NUMBER
Wrapper around WikipediaAPI.
To use, you should have the wikipedia python package installed.
This wrapper will use the Wikipedia API to conduct searches and
fetch page summaries. By default, it w
Routes available for the Arcee API as enumerator.
Filter types available for a DALM retrieval as enumerator.
Filters available for a DALM retrieval and generation.
Source of an Arcee document.
Arcee document.
Adapter for Arcee documents
Wrapper for Arcee API.
For more details, see: https://www.arcee.ai/
Portkey configuration.
Wrapper for Stack Exchange API.
Wrapper for OpenWeatherMap API using PyOWM.
Docs for using:
Wrapper around Google Books API.
To use, you should have a Google Books API key available. This wrapper will use the Google Books API to conduct searches and fetch books based on a query passed in by
Wrapper for NASA API.
Wrapper for SerpApi's Google Lens API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the SerpApi.com python package: https://serpapi.com/integra
Wrapper for AlphaVantage API for Currency Exchange Rate.
Docs for using:
Enumerator of the HTTP verbs.
OpenAPI Model that removes mis-formatted parts of the spec.
Wrapper for financial datasets API.
Wrapper around semanticscholar.org API. https://github.com/danielnsilva/semanticscholar
You should have this library installed.
pip install semanticscholar
Semantic Scholar API can conduct search
Wrapper around PubMed API.
This wrapper will use the PubMed API to conduct searches and fetch document summaries. By default, it will return the document summaries of the top-k results of an input se
An empty Sentinel type.
An enum of the possible choices for Riva audio encoding.
The list of types exposed by the Riva GRPC Protobuf files can be found with the following commands:
import riva.client
print(riva.cl
Configuration for the authentication to a Riva service connection.
A collection of common Riva settings.
A message containing streaming audio.
A runnable that performs Automatic Speech Recognition (ASR) using NVIDIA Riva.
A runnable that performs Text-to-Speech (TTS) with NVIDIA Riva.
Wrapper for GitHub API.
Escape punctuation within an input string.
Wrapper around requests to handle auth and async.
The main purpose of this wrapper is to handle authentication (by saving headers) and enable easy async methods on the same base object.
Lightweight wrapper around requests library.
Lightweight wrapper around requests library, with async support.
The main purpose of this wrapper is to always return a json output.
Lightweight wrapper around requests library, with async support.
The main purpose of this wrapper is to always return a text output.
Wrapper around the Jina search engine.
Setup mode for AstraDBEnvironment as enumerator.
Wrapper for AWS Lambda SDK.
To use, you should have the boto3 package installed
and a lambda functions built from the AWS Console or
CLI. Set up your AWS credentials with aws configure
Wrapper for Dataherald.
Docs for using:
Wrapper for OpenAI's DALL-E Image Generator.
https://platform.openai.com/docs/guides/images/generations?context=node
Usage instructions:
pip install openaiWrapper for AskNews API.
Wrapper for Tavily Search API.
Wrapper around Dria API.
This wrapper facilitates interactions with Dria's vector search and retrieval services, including creating knowledge bases, inserting data, and fetching search results.
Interface for querying Alibaba Cloud MaxCompute tables.
Wrapper for SerpApi's Google Finance API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up. The wrapper uses the SerpApi.com python package: https://serpapi.com/integ
Wrapper around ArxivAPI.
To use, you should have the arxiv python package installed.
https://lukasschwab.me/arxiv.py/index.html
This wrapper will use the Arxiv API to conduct searches and
fetch d
Routes available for the Pebblo API as enumerator.
Pebblo Indexed Document.
Pebblo Runtime.
Pebblo Framework instance.
Pebblo AI application.
Pebblo document.
Wrapper for Pebblo Loader API.
Dict like wrapper around search api results.
Wrapper for Searx API.
To use you need to provide the searx host by passing the named parameter
searx_host or exporting the environment variable SEARX_HOST.
In some situations you might want
Wrapper around SearchApi API.
To use, you should have the environment variable SEARCHAPI_API_KEY
set with your API key, or pass searchapi_api_key
as a named parameter to the constructor.
Wrapper around GraphQL API.
To use, you should have the gql python package installed.
This wrapper will use the GraphQL API to conduct queries.
Wrapper for Steam API.
Apache Cassandra® database wrapper.
Exception raised for errors in the database schema.
Wrapper for Merriam-Webster.
Docs for using:
Wrapper for Polygon API.
Wrapper for Google Scholar API
You can create serpapi key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the serpapi python package: https://serpapi.com/integrations/python#se
Wrapper for DuckDuckGo Search API.
Free and does not require any setup.
Wrapper for Metaphor Search API.
Wrapper around OutlineAPI.
This wrapper will use the Outline API to query the documents of your instance. By default it will return the document content of the top-k results. It limits the document c
Wrapper for GitLab API.
Wrapper for Reddit API
To use, set the environment variables REDDIT_CLIENT_ID,
REDDIT_CLIENT_SECRET, REDDIT_USER_AGENT to set the client ID,
client secret, and user agent, respectively, a
Wrapper for Golden.
Docs for using:
Wrapper for Rememberizer APIs.
Wrapper around bibtexparser.
To use, you should have the bibtexparser python package installed.
https://bibtexparser.readthedocs.io/en/master/
This wrapper will use bibtexparser to load a collec
SparkSQL is a utility class for interacting with Spark SQL.
Wrapper for SerpApi's Google Scholar API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up. The wrapper uses the SerpApi.com python package: https://serpapi.com/integ
Metadata on a single hit from you.com
A single hit from you.com, which may contain multiple snippets
Output from you.com API.
Output of parsing one snippet.
Wrapper for you.com Search and News API.
To connect to the You.com api requires an API key which you can get at https://api.you.com. You can check out the docs at https://documentation.you.com/api-re
Wrapper for Bing Web Search API.
Mixin to prevent storing on disk.
Manage the token for the NutritionAI API.
Wrapper for the Passio Nutrition AI API.
Create PowerBI engine from dataset ID and credential or token.
Use either the credential or a supplied token to authenticate. If both are supplied the credential is used to generate a token. The impe
Custom embedding models on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and SSH credenti
Model2Vec embedding models.
Install model2vec first, run 'pip install -U model2vec'. The github repository for model2vec is : https://github.com/MinishLab/model2vec
OctoAI Compute Service embedding models.
See https://octo.ai/ for information about OctoAI.
To use, you should have the openai python package installed and the
environment variable ``OCTOAI_API_
NLP Cloud embedding models.
To use, you should have the nlpcloud python package installed
ZhipuAI embedding model integration.
Setup:
To use, you should have the ``zhipuai`` python package installed, and the
environment variable ``ZHIPU_API_KEY`` set with your API KEY.
More
Volcengine Embeddings embedding models.
Quantized bi-encoders embedding models.
Please ensure that you have installed optimum-intel and ipex.
LocalAI embedding models.
Since LocalAI and OpenAI have 1:1 compatibility between APIs, this class
uses the openai Python package's openai.Embedding as its client.
Thus, you should have the `
NCP ClovaStudio Embedding API.
following environment variables set or passed in constructor in lower case:
NCP_CLOVASTUDIO_API_KEYNCP_APIGW_API_KEYNCP_CLOVASTUDIO_APP_IDHuggingFace embedding models on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and SSH cre
HuggingFace InstructEmbedding models on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and
llama.cpp embedding models.
To use, you should have the llama-cpp-python library installed, and provide the path to the Llama model as a named parameter to the constructor. Check out: https://github.
LLMRails embedding models.
To use, you should have the environment
variable LLM_RAILS_API_KEY set with your API key or pass it
as a named parameter to the constructor.
Model can be one of ["emb
Leverage Itrex runtime to unlock the performance of compressed NLP models.
Please ensure that you have installed intel-extension-for-transformers.
Llamafile lets you distribute and run large language models with a single file.
To get started, see: https://github.com/Mozilla-Ocho/llamafile
To use this class, you will need to first:
ModelScopeHub embedding models.
To use, you should have the modelscope python package installed.
A class to handle embedding requests to the TextEmbed API.
A client to handle synchronous and asynchronous requests to the TextEmbed API.
Fake embedding model.
Fake embedding model that always returns the same embedding vector for the same text.
Javelin AI Gateway embeddings.
To use, you should have the javelin_sdk python package installed.
For more information, see https://docs.getjavelin.io
EdenAI embedding.
environment variable EDENAI_API_KEY set with your API key, or pass
it as a named parameter.
Embeddings by spaCy models.
Custom exception for interfacing with Takeoff Embedding class.
Exception raised when no consumer group is provided on initialization of TitanTakeoffEmbed or in embed request.
Device to use for inference, cuda or cpu.
Configuration for the reader to be deployed in Takeoff.
Interface with Takeoff Inference API for embedding models.
Use it to send embedding requests and to deploy embedding readers with Takeoff.
Gradient.ai Embedding models.
GradientLLM is a class to interact with Embedding Models on gradient.ai
To use, set the environment variable GRADIENT_ACCESS_TOKEN with your
API token and ``GRADIEN
Deprecated, TinyAsyncGradientEmbeddingClient was removed.
This class is just for backwards compatibility with older versions of langchain_community. It might be entirely removed in the future.
Baidu Qianfan Embeddings embedding models.
Content handler for LLM class.
Custom Sagemaker Inference Endpoints.
To use, you must supply the endpoint name from your deployed Sagemaker model & the region where it is deployed.
To authenticate, the AWS client uses the followi
Clarifai embedding models.
To use, you should have the clarifai python package installed, and the
environment variable CLARIFAI_PAT set with your personal access token or pass it
as a named p
Bookend AI sentence_transformers embedding models.
Embedding documents and queries with Awa DB.
Wrapper around the BGE embedding model with IPEX-LLM optimizations on Intel CPUs and GPUs.
To use, you should have the ipex-llm
and sentence_transformers package installed. Refer to
`here <ht
OpenVINO embedding models.
OpenVNO BGE embedding models.
MiniMax embedding model integration.
Prem's Embedding APIs
Anyscale Embeddings API.
Qdrant FastEmbedding models.
FastEmbed is a lightweight, fast, Python library built for embedding generation. See more documentation at:
JohnSnowLabs embedding models
To use, you should have the johnsnowlabs python package installed.
Example:
.. code-block:: python
from langchain_community.embeddings.johnsnowlabs impo
Payload for the Embaas embeddings API.
Embaas's embedding service.
To use, you should have the
environment variable EMBAAS_API_KEY set with your API key, or pass
it as a named parameter to the constructor.
Deep Infra's embedding inference service.
To use, you should have the
environment variable DEEPINFRA_API_TOKEN set with your API token, or pass
it as a named parameter to the constructor.
There a
OVHcloud AI Endpoints Embeddings.
Google's PaLM Embeddings APIs.
Baichuan Text Embedding models.
LASER Language-Agnostic SEntence Representations. LASER is a Python library developed by the Meta AI Research team and used for creating multilingual sentence embeddings for over 147 languages as of 2
OCI authentication types as enumerator.
OCI embedding models.
To authenticate, the OCI client uses the methods described in https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm
The authentifcation method
MLflow AI Gateway embeddings.
To use, you should have the mlflow[gateway] python package installed.
For more information, see https://mlflow.org/docs/latest/gateway/index.html.
GPT4All embedding models.
To use, you should have the gpt4all python package installed
Ascend NPU accelerate Embedding model
Please ensure that you have installed CANN and torch_npu.
Example:
from langchain_community.embeddings import AscendEmbeddings model = AscendEmbeddings(model_p
Embedding LLMs in MLflow.
To use, you should have the mlflow[genai] python package installed.
For more information, see https://mlflow.org/docs/latest/llms/deployments.
Cohere embedding LLMs in MLflow.
Self-hosted embedding models for infinity package.
See https://github.com/michaelfeil/infinity This also works for text-embeddings-inference and other self-hosted openai-compatible servers.
Infini
Helper tool to embed Infinity.
It is not a part of Langchain's stable API, direct use discouraged.
MosaicML embedding service.
To use, you should have the
environment variable MOSAICML_API_TOKEN set with your API token, or pass
it as a named parameter to the constructor.
YandexGPT Embeddings models.
To use, you should have the yandexcloud python package installed.
There are two authentication options for the service account
with the ai.languageModels.user ro
Tencent Hunyuan embedding models API by Tencent.
For more information, see https://cloud.tencent.com/document/product/1729
DashScope embedding models.
To use, you should have the dashscope python package installed, and the
environment variable DASHSCOPE_API_KEY set with your API key or pass it
as a named paramete
Optimized Infinity embedding models.
https://github.com/michaelfeil/infinity This class deploys a local Infinity instance to embed text. The class requires async usage.
Infinity is a class to intera
URL class for parsing the URL.
SparkLLM embedding model integration.
Exception raised for errors in the header assembly.
Xinference embedding models.
To use, you should have the xinference library installed:
.. code-block:: bash
pip install xinference
If you're simply using the services provided by Xinference, y
Aleph Alpha's asymmetric semantic embedding.
AA provides you with an endpoint to embed a document and a query. The models were optimized to make the embeddings of documents and the query for a docume
Symmetric version of the Aleph Alpha's semantic embeddings.
The main difference is that here, both the documents and queries are embedded with a SemanticRepresentation.Symmetric Example: .. code-
text2vec embedding models.
Install text2vec first, run 'pip install -U text2vec'. The github repository for text2vec is : https://github.com/shibing624/text2vec
Jina embedding models.
TensorflowHub embedding models.
To use, you should have the tensorflow_text python package installed.
Docstore via arbitrary lookup function.
Wikipedia API.
Simple in memory docstore in the form of a dict.
Interface to access to place that stores documents.
Mixin class that supports adding texts.
Input for the GoogleBooksQuery tool.
Tool that searches the Google Books API.
Input for the YahooFinanceNews tool.
Tool that searches financial news on Yahoo Finance.
API Configuration.
AI Plugin Definition.
Schema for AIPluginTool.
Tool for getting the OpenAPI spec for an AI Plugin.
IFTTT Webhook.
Tool that asks user for input.
Tool that queries the BraveSearch.
Api key can be provided as an environment variable BRAVE_SEARCH_API_KEY or as a parameter.
Example usages: .. code-block:: python # uses BRAVE_SEARCH_API_KEY f
Riza Code tool.
A tool implementation to execute JavaScript via Riza's Code Interpreter API.
Tool for interacting with the GitHub API.
Tool that queries the Atlassian Jira API.
Commands for the Bash Shell tool.
Tool to run shell commands.
Base tool for interacting with a SQL database.
Tool for querying a SQL database.
.. versionchanged:: 0.3.12
Renamed from QuerySQLDataBaseTool to QuerySQLDatabaseTool.
Legacy name still works for backwards compatibility.
Tool for getting metadata about a SQL database.
Tool for getting tables names.
Use an LLM to check if a query is correct. Adapted from https://www.patterns.app/blog/2023/01/18/crunchbot-sql-analyst-gpt/
Input for the Arxiv tool.
Tool that searches the Arxiv API.
Tool for querying a Power BI Dataset.
Tool for getting metadata about a PowerBI Dataset.
Tool for getting tables names.
Input for the AskNews Search tool.
Tool that searches the AskNews API.
Tool that queries the Bing search API.
Bing Search tool.
Tool that queries the Google Finance API.
Input for CreateSessionTool.
Tool that creates a new Multion Browser Window with provided fields.
Input for UpdateSessionTool.
Tool that updates an existing Multion Browser Window with provided fields.
Input for UpdateSessionTool.
Tool that closes an existing Multion Browser Window with provided fields.
Tool that queries the Google trends API.
Input for the Jina search tool.
Tool that queries the JinaSearch.
..versionadded:: 0.2.16
Input for the SemanticScholar tool.
Tool that searches the semanticscholar API.
Tool that queries the Clickup API.
the base tool for all the EdenAI Tools .
you should have
the environment variable EDENAI_API_KEY set with your API token.
You can find your token here: https://app.edenai.run/admin/account/setting
Tool that queries the Eden AI Text to speech API. for api reference check edenai documentation: https://docs.edenai.co/reference/audio_text_to_speech_create.
To use, you should have the environment v
Tool that queries the Eden AI Explicit text detection.
for api reference check edenai documentation: https://docs.edenai.co/reference/image_explicit_content_create.
To use, you should have the envir
Tool that queries the Eden AI Speech To Text API.
for api reference check edenai documentation: https://app.edenai.run/bricks/speech/asynchronous-speech-to-text.
To use, you should have the environm
Tool that queries the Eden AI Explicit image detection.
for api reference check edenai documentation: https://docs.edenai.co/reference/image_explicit_content_create.
To use, you should have the envi
Tool that queries the Eden AI Identity parsing API.
for api reference check edenai documentation: https://docs.edenai.co/reference/ocr_identity_parser_create.
To use, you should have the environmen
Tool that queries the Eden AI Object detection API.
for api reference check edenai documentation: https://docs.edenai.co/reference/image_object_detection_create.
To use, you should have the environm
Tool that queries the Eden AI Invoice parsing API.
for api reference check edenai documentation: https://docs.edenai.co/reference/ocr_invoice_parser_create.
To use, you should have the environment v
Input for CopyFileTool.
Tool that adds the capability to sleep.
Inputs to the Passio Nutrition AI tool.
Tool that queries the Passio Nutrition AI API.
Base tool for interacting with Spark SQL.
Tool for querying a Spark SQL.
Tool for getting metadata about a Spark SQL.
Tool for getting tables names.
Use an LLM to check if a query is correct. Adapted from https://www.patterns.app/blog/2023/01/18/crunchbot-sql-analyst-gpt/
Schema for transfer operations.
Tool for transfer operations.
Schema for value operations.
Tool for value operations.
Schema for owner operations.
Tool for owner operations.
Type of app operation as enumerator.
Schema for app operations.
Tool for app operations.
Schema for owner operations.
Tool for owner operations.
Type of operation as enumerator.
Base class for the AINetwork tools.
Input for SendMessageTool.
Send an email in Office 365.
Input for CreateEvent Tool.
Tool for sending calendar events in Office 365.
Input for SendMessageTool.
Tool for creating a draft email in Office 365.
Input for SearchEmails Tool.
Search email messages in Office 365.
Free, but setup is required.
Input for SearchEmails Tool.
From https://learn.microsoft.com/en-us/graph/search-query-parameter
Search calendar events in Office 365.
Free, but setup is required
Base class for the Office 365 tools.
Traverse an AST and output source code for the abstract syntax; original formatting is disregarded.
Description of the uploaded path with its remote path.
Arguments for the E2BDataAnalysisTool.
Tool for running python code in a sandboxed environment for data analysis.
Base class for JSON spec.
Tool for listing keys in a JSON spec.
Tool for getting a value in a JSON spec.
Tool that queries the OpenWeatherMap API.
Input for the DuckDuckGo search tool.
DuckDuckGo tool.
Tool that queries the DuckDuckGo search API and
returns the results in output_format.
Base class for requests tools.
Tool for making a GET request to an API endpoint.
Tool for making a POST request to an API endpoint.
Tool for making a PATCH request to an API endpoint.
Tool for making a PUT request to an API endpoint.
Tool for making a DELETE request to an API endpoint.
Models available for Eleven Labs Text2Speech.
Models available for Eleven Labs Text2Speech.
Tool that queries the Eleven Labs Text2Speech API.
In order to set this up, follow instructions at: https://elevenlabs.io/docs
Tool that queries the Azure AI Services Text to Speech API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/get-started-text-to-spe
Tool that queries the Azure AI Services Document Intelligence API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/quickstar
Tool that queries the Azure AI Services Image Analysis API.
In order to set this up, follow instructions at: https://learn.microsoft.com/azure/ai-services/computer-vision/quickstarts-sdk/image-analys
Tool that queries the Azure AI Services Text Analytics for Health API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/ai-services/language-service/text-analy
Tool that queries the Azure AI Services Speech to Text API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/ai-services/speech-service/get-started-speech-to-t
Input schema for the you.com tool.
Tool that searches the you.com API.
Tool that queries the Google Lens API.
Tool that queries the Google Jobs API.
Tool that queries the SearchApi.io search API.
Tool that queries the SearchApi.io search API and returns JSON.
Tool that searches the PubMed API.
Base tool for querying a GraphQL API.
Input for PolygonAggregates.
Tool that gets aggregate bars (stock prices) over a given date range for a given ticker from Polygon.
Inputs for Polygon's Last Quote API
Tool that gets the last quote of a ticker from Polygon
Inputs for Polygon's Financials API
Tool that gets the financials of a ticker from Polygon
Inputs for Polygon's Ticker News API
Tool that gets the latest news for a given ticker from Polygon
Input for the Tavily tool.
Input for WriteFileTool.
Tool that writes a file to disk.
Input for MoveFileTool.
Tool that moves a file.
Input for ReadFileTool.
Tool that reads a file.
Error for paths outside the root directory.
Mixin for file system tools.
Input for ListDirectoryTool.
Tool that lists files and directories in a specified folder.
Input for DeleteFileTool.
Tool that deletes a file.
Input for CopyFileTool.
Tool that copies a file.
Input for FileSearchTool.
Tool that searches for files in a subdirectory that match a regex pattern.
Tool that queries the Atlassian Jira API.
Protocol for trainable language models.
Tool that trains a language model.
Tool that queries using the Dataherald SDK.
Tool that queries the DataForSeo Google search API.
Tool that queries the DataForSeo Google Search API and get back json.
HuggingFace Text-to-Speech Model Inference.
Base class for tools that use a VectorStore.
Tool for the VectorDBQA chain. To be initialized with name and chain.
Tool for the VectorDBQAWithSources chain.
Tool that queries the Google search API.
Tool that searches the Steam Web API.
Connery Action parameter validation model.
Connery Action parameter model.
Connery Action model.
Service for interacting with the Connery Runner API.
It gets the list of available actions from the Connery Runner, wraps them in ConneryAction Tools and returns them to the user. It also provides a
Connery Action tool.
Supported Image Models for generation.
Tool used to generate images from a text-prompt.
Input for the WikipediaQuery tool.
Tool that searches the Wikipedia API.
Tool that generates an image using OpenAI DALLE.
Input for SceneXplain.
Tool that explains images.
Input for the SearxSearch tool.
Tool that queries a Searx instance.
Tool that queries a Searx instance and gets back json.
Arguments for the BearlyInterpreterTool.
Information about a file to be uploaded.
Tool for evaluating python code in a sandbox environment.
Tool for interacting with the GitLab API.
Tool to run a specific action from the user's exposed actions.
Tool to list all exposed actions for the user.
Schema for the AmadeusFlightSearch tool.
Tool for searching for a single flight between two airports.
Schema for the AmadeusClosestAirport tool.
Tool for finding the closest airport to a particular location.
Base Tool for Amadeus.
Tool that searches the Merriam-Webster API.
Tool that queries using the Wolfram Alpha SDK.
Tool that queries the Serper.dev Google search API.
Tool that queries the Serper.dev Google Search API and get back json.
Input for SendMessageTool.
Tool that sends a message to Gmail.
Input for CreateDraftTool.
Tool that creates a draft email for Gmail.
Input for GetMessageTool.
Tool that gets a message by ID from Gmail.
Input for GetMessageTool.
Tool that gets a thread by ID from Gmail.
Base class for Gmail tools.
Enumerator of Resources to search.
Input for SearchGmailTool.
Tool that searches for messages or threads in Gmail.
Input for SendMessageTool.
Tool for sending a message in Slack.
Tool that gets Slack channel information.
Input schema for SlackGetMessages.
Tool that gets Slack messages.
Input for ScheduleMessageTool.
Tool for scheduling a message in Slack.
Base class for Slack tools.
Explicit no-args input for NavigateBackTool.
Navigate back to the previous page in the browser history.
Explicit no-args input for ExtractTextTool.
Tool for extracting all the text on the current webpage.
Input for NavigateToolInput.
Tool for navigating a browser to a URL.
Security Note: This tool provides code to control web-browser navigation.
This tool can navigate to any URL, including internal network URLs, and
Explicit no-args input for CurrentWebPageTool.
Tool for getting the URL of the current webpage.
Input for ExtractHyperlinksTool.
Extract all hyperlinks on the page.
Input for GetElementsTool.
Tool for getting elements in the current web page matching a CSS selector.
Base class for browser tools.
Input for ClickTool.
Tool for clicking on an element with the given CSS selector.
Tool that adds the capability to query using the Golden API and get back JSON.
Input for CashFlowStatements.
Tool that gets cash flow statements for a given ticker over a given period.
Input for BalanceSheets.
Tool that gets balance sheets for a given ticker over a given period.
Input for IncomeStatements.
Tool that gets income statements for a given ticker over a given period.
Tool that uses StackExchange
Tool that queries the Azure Cognitive Services Form Recognizer API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/applied-ai-services/form-recognizer/quicks
Tool that queries the Azure Cognitive Services Speech2Text API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-
Tool that queries the Azure Cognitive Services Text Analytics for Health API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/ai-services/language-service/tex
Tool that queries the Azure Cognitive Services Text2Speech API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/cognitive-services/speech-service/get-started-
Tool that queries the Azure Cognitive Services Image Analysis API.
In order to set this up, follow instructions at: https://learn.microsoft.com/en-us/azure/cognitive-services/computer-vision/quicksta
Result of executing a function. We always use a string to present the result value for AI model to consume.
Input for Nuclia Understanding API.
Tool to process files with the Nuclia Understanding API.
Base tool for interacting with an Apache Cassandra database.
Tool for querying an Apache Cassandra database with provided CQL.
Tool for getting the schema of a keyspace in an Apache Cassandra database.
Tool for getting data from a table in an Apache Cassandra database. Use the WHERE clause to specify the predicate for the query that uses the primary key. A blank predicate will return all rows. Avoid
Tool that uses the Cogniswitch service to answer questions.
name: str = "cogniswitch_knowledge_request" description: str = ( "A wrapper around cogniswitch service to answer the question from
Tool that uses the Cogniswitch services to get the status of the document or url uploaded.
name: str = "cogniswitch_knowledge_status" description: str = ( "A wrapper around cogniswitch services
Tool that uses the Cogniswitch services to store data from file.
name: str = "cogniswitch_knowledge_source_file" description: str = ( "This calls the CogniSwitch services to analyze & store data
Tool that uses the Cogniswitch services to store data from a URL.
name: str = "cogniswitch_knowledge_source_url" description: str = ( "This calls the CogniSwitch services to analyze & store data
Tool that queries YouTube.
Tool that searches the Wikidata API.
The location of the property.
Base model for an API property.
A model for a property in the query, path, header, or cookie params.
A model for a request body property.
A model for a request body.
A model for a single API operation.
Tool to get example SQL queries related to an input question.
Fake cross encoder model.
Content handler for CrossEncoder class.
SageMaker Inference CrossEncoder endpoint.
To use, you must supply the endpoint name from your deployed Sagemaker model & the region where it is deployed.
To authenticate, the AWS client uses the fo
HuggingFace cross encoder models.
Representation of a callable function to the Ernie API.
Representation of a callable function to the Ernie API.
Load acreom vault from a directory.
Load Markdown files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document
Load fetching transcripts from BiliBili videos.
Load news articles from URLs using Unstructured.
Load cards from a Trello board.
Load from Tencent Cloud COS file.
Recursively load all child links from a root URL.
Security Note: This loader is a crawler that will start crawling at a given URL and then expand to crawl child links recursively.
We
Load AZLyrics webpages.
Load table schemas from AWS Glue.
This loader fetches the schema of each table within a specified AWS Glue database. The schema details include column names and their data types, similar to pandas dt
Load documents from Microsoft OneDrive.
Uses SharePointLoader under the hood.
Abstract base class for all evaluators.
Each evaluator should take a page, a browser instance, and a response object, process the page as necessary, and return the resulting text.
Evaluate the page HTML content using the unstructured library.
Load HTML pages with Playwright and parse with Unstructured.
This is useful for loading pages that require javascript to render.
Load Microsoft PowerPoint files using Unstructured.
Works with both .ppt and .pptx files. You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the docume
Load RST files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document obje
Load IMSDb webpages.
Load notes from Joplin.
In order to use this loader, you need to have Joplin running with the Web Clipper enabled (look for "Web Clipper" in the app settings).
To get the access token, you need to
Load documents by querying database tables supported by SQLAlchemy.
For talking to the database, the document loader uses the SQLDatabase
utility from the LangChain integration toolkit.
Each docum
Base class for all loaders that uses O365 Package
Load with Brave Search engine.
Load from TensorFlow Dataset.
Load a PDF with Azure Document Intelligence.
Load OpenOffice ODT files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Do
Load from Azure AI Data.
Load news articles from RSS feeds using Unstructured.
Load Notion directory dump.
Load email files using Unstructured.
Works with both .eml and .msg files. You can process attachments in addition to the e-mail message itself by passing process_attachments=True into the construct
Loads Outlook Message files using extract_msg.
https://github.com/TeamMsgExtractor/msg-extractor
Load RTF files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document obje
WebBaseLoader document loader integration
Load from Stripe API.
Load from Spreedly API.
Load Figma file.
Load from Wikipedia.
The hard limit on the length of the query is 300 for now.
Each wiki page represents one Document.
Document loader for EverNote ENEX export files.
Loads EverNote notebook export files (.enex format) into LangChain Documents.
Extracts plain text content from HTML and preserves note metadata inc
Load files from remote URLs using Unstructured.
Use the unstructured partition function to detect the MIME type and route the file to the appropriate partitioner.
You can run the loader in one of
Load from a directory.
Load a sitemap and its URLs.
Security Note: This loader can be used to load all URLs specified in a sitemap. If a malicious actor gets access to the sitemap, they could force the server t
Load Cube semantic layer metadata.
File encoding as the NamedTuple.
Load conversations from exported ChatGPT data.
Load from Tencent Cloud COS directory.
Client for lakeFS.
Load from lakeFS.
Load from lakeFS as unstructured data.
ModuleName document loader integration
Load from LarkSuite (FeiShu).
Load from LarkSuite (FeiShu) wiki.
Load Hacker News data.
It loads data from either main page results or the comments page.
Load HTML using 2markdown API.
Load Twitter tweets.
Read tweets of the user's Twitter handle.
First you need to go to
https://developer.twitter.com/en/docs/twitter-api /getting-started/getting-access-to-the-twitter-api
to get
Load content from RSpace notebooks, folders, documents or PDF Gallery files.
Map RSpace document <-> Langchain Document in 1-1. PDFs are imported using PyPDF.
Requirements are rspace_client (`pip in
Load DOCX file using docx2txt and chunks at character level.
Defaults to check for local file, but if the file is a web path, it will download it to a temporary file, and use that, then clean up
Load Microsoft Word file using Unstructured.
Works with both .docx and .doc files. You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will
Load XML file using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document objec
Load with an Airbyte source connector implemented using the CDK.
A wrapper around the CDK integration.
Load from Hubspot using an Airbyte source connector.
Load from Stripe using an Airbyte source connector.
Load from Typeform using an Airbyte source connector.
Load from Zendesk Support using an Airbyte source connector.
Load from Shopify using an Airbyte source connector.
Load from Salesforce using an Airbyte source connector.
Load from Gong using an Airbyte source connector.
Load MediaWiki dump from an XML file.
Load from Baidu Cloud BOS file.
Enumerator of the supported blockchains.
Load elements from a blockchain smart contract.
See supported blockchains here: https://python.langchain.com/v0.2/api_reference/community/document_loaders/langchain_community.document_loaders.blockch
Load Obsidian files from directory.
Load Pandas DataFrame.
Load from Baidu BOS directory.
Transcript format to use for the document loader.
Load AssemblyAI audio transcripts.
It uses the AssemblyAI API to transcribe audio files and loads the transcribed text into one or more Documents, depending on the specified format.
To use, you shou
Load AssemblyAI audio transcripts.
It uses the AssemblyAI API to get an existing transcription and loads the transcribed text into one or more Documents, depending on the specified format.
Load web pages as Documents using Spider AI.
Must have the Python package spider-client installed and a Spider API key.
See https://spider.cloud for more.
Load .srt (subtitle) files.
Load records from an ArcGIS FeatureLayer.
FireCrawlLoader document loader integration
Load iFixit repair guides, device wikis and answers.
iFixit is the largest, open repair community on the web. The site contains nearly 100k repair manuals, 200k Questions & Answers on 42k devices,
Load from the PubMed biomedical library.
Load PNG and JPG files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Doc
Load Datadog logs.
Logs are written into the page_content and into the metadata.
Load GitHub repository Issues.
Load issues of a GitHub repository.
Load GitHub File
Load the Mastodon 'toots'.
Load text file.
Column not found error.
Load from a Rockset database.
To use, you should have the rockset python package installed.
Load documents from Couchbase.
Each document represents one row of the result. The page_content_fields are
written into the page_contentof the document. The metadata_fields are written
into t
Load Jupyter notebook (.ipynb) files.
Load from Amazon AWS S3 file.
Scrape HTML pages from URLs using a headless instance of the Chromium.
Load from Huawei OBS directory.
Load a Blackboard course.
This loader is not compatible with all Blackboard courses. It is only compatible with courses that use the new Blackboard interface. To use this loader, you must have the
Load HTML pages with Selenium and parse with Unstructured.
This is useful for loading pages that require javascript to render.
Load CoNLL-U files.
Load Polars DataFrame.
Load from Telegram chat dump.
Load Telegram chat json directory dump.
Load files from Dropbox.
In addition to common files such as text and PDF files, it also supports Dropbox Paper files.
Load Org-Mode files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document
Load TSV files using Unstructured.
Like other Unstructured loaders, UnstructuredTSVLoader can be used in both "single" and "elements" mode. If you use the loader in "elements" mode, the TSV file
Load from Psychic.dev.
Load from FaunaDB.
Load documents from TiDB.
Merge documents from a list of loaders
Turn a url to llm accessible markdown with Scrapfly.io.
For further details, visit: https://scrapfly.io/docs/sdk/python
Parse Oracle doc metadata...
Read a file
Load Diffbot json file.
Load Discord chat logs.
Load from Kinetica API.
Each document represents one row of the result. The page_content_columns
are written into the page_content of the document. The metadata_columns
are written into the `
Load from Alibaba Cloud MaxCompute table.
Load documents from Yuque.
Load WhatsApp messages text file.
Load a query result from Arxiv.
The loader converts the original PDF format into the text.
Load a CSV file into a list of Document objects.
Each document represents one row of the CSV file. Every row is converted into a key/value pair and outputted to a new line in the document's page_
Load CSV files using Unstructured.
Like other Unstructured loaders, UnstructuredCSVLoader can be used in both "single" and "elements" mode. If you use the loader in "elements" mode, the CSV file
Load Xorbits DataFrame.
Pebblo Safe Loader class is a wrapper around document loaders enabling the data to be scrutinized.
Loader for text data.
Since PebbloSafeLoader is a wrapper around document loaders, this loader is used to load text data directly into Documents.
Load transactions from Ethereum mainnet.
The Loader use Etherscan API to interact with Ethereum mainnet.
ETHERSCAN_API_KEY environment variable must be set use this loader.
Load Facebook Chat messages directory dump.
Enumerator of the content formats of Confluence page.
Load Confluence pages.
Port of https://llamahub.ai/l/confluence This currently supports username/api_key, Oauth2 login, personal access token or cookies authentication.
Specify a list page_ids and
Load from Amazon AWS S3 directory.
Load documents from AWS Athena.
Each document represents one row of the result.
page_content of the document
and none into the metadata of the docLoad HTML files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document obj
Load EPub files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document obj
Load PySpark DataFrames.
NeedleLoader is a document loader for managing documents stored in a collection.
Load from Docusaurus Documentation.
It leverages the SitemapLoader to loop through the generated pages of a Docusaurus Documentation website and extracts the content by looking for specific HTML tags
Load from IUGU.
Load pages from OneNote notebooks.
Load Documents using LLMSherpa.
LLMSherpaFileLoader use LayoutPDFReader, which is part of the LLMSherpa library. This tool is designed to parse PDFs while preserving their layout information, which
Load from Gutenberg.org.
Load ReadTheDocs documentation directory.
Parse MHTML files with BeautifulSoup.
Load from Modern Treasury.
Load a file from Microsoft OneDrive.
Turn an url to LLM accessible markdown with ScrapingAnt.
For further details, visit: https://docs.scrapingant.com/python-client
Load College Confidential webpages.
Load from a Slack directory dump.
Generic Google API Client.
To use, you should have the google_auth_oauthlib,youtube_transcript_api,google
python package installed.
As the google api expects credentials you need to set up a goog
Output formats of transcripts from YoutubeLoader.
Load YouTube video transcripts.
Load all Videos from a YouTube Channel.
To use, you should have the googleapiclient,youtube_transcript_api
python package installed.
As the service needs a google_api_client, you first have to
Load SurrealDB documents.
Load elements from a blockchain smart contract.
The supported blockchains are: Near mainnet, Near testnet.
If no BlockchainType is specified, the default is Near mainnet.
The Loader uses the Mintba
Load from DuckDB.
Each document represents one row of the result. The page_content_columns
are written into the page_content of the document. The metadata_columns
are written into the `metada
Load from any file type using Nuclia Understanding API.
Load pre-rendered web pages using a headless browser hosted on Browserbase.
Depends on browserbase and playwright packages.
Get your API key from https://browserbase.com
Load Microsoft Excel files using Unstructured.
Like other Unstructured loaders, UnstructuredExcelLoader can be used in both "single" and "elements" mode. If you use the loader in "elements" mode, e
Load from SharePoint.
Load the Airtable tables.
Load Roam files from a directory.
Load CHM files using Unstructured.
CHM means Microsoft Compiled HTML Help.
Examples
from langchain_community.document_loaders import UnstructuredCHMLoader
loader = UnstructuredCHMLoade
Microsoft Compiled HTML Help (CHM) Parser.
Load HTML asynchronously.
Load webpages with Browserless /content endpoint.
Load weather data with Open Weather Map API.
Reads the forecast & current weather of any location using OpenWeatherMap's free API. Checkout 'https://openweathermap.org/appid' for more on how to gen
Load Reddit posts.
Read posts on a subreddit. First, you need to go to https://www.reddit.com/prefs/apps/ and create your application
Load Git repository files.
The Repository can be local on disk available at repo_path,
or remote at clone_url that will be cloned to repo_path.
Currently, supports only text files.
Each docu
Load from Open City.
Load a JSON file using a jq schema.
Load from Hugging Face Hub datasets.
Load image captions.
By default, the loader utilizes the pre-trained Salesforce BLIP image captioning model. https://huggingface.co/Salesforce/blip-image-captioning-base
Load local Airbyte json files.
Load from Notion DB.
Reads content from pages within a Notion Database. Args: integration_token (str): Notion integration token. database_id (str): Notion database id. request_timeout_s
Load a bibtex file.
Each document represents one entry from the bibtex file.
If a PDF file is present in the file bibtex field, the original PDF
is loaded into the document text. If no such file
Load from Snowflake API.
Each document represents one row of the result. The page_content_columns
are written into the page_content of the document. The metadata_columns
are written into the
Load GitBook data.
When load_all_paths=True, the loader parses XML sitemaps an
Load PDF files using Unstructured.
You can run the loader in one of two modes: "single" and "elements". If you use "single" mode, the document will be returned as a single langchain Document obje
Base Loader class for PDF files.
If the file is a web path, it will download it to a temporary file, use it, then clean up the temporary file after completion.
Load online PDF.
Load and parse a PDF file using 'pypdf' library.
This class provides methods to load and parse PDF documents, supporting various configurations such as handling password-protected files, extrac
Load and parse a PDF file using the pypdfium2 library.
This class provides methods to load and parse PDF documents, supporting various configurations such as handling password-protected files
Load and parse a directory of PDF files using 'pypdf' library.
This class provides methods to load and parse multiple PDF documents in a directory, supporting options for recursive search, handling p
Load and parse a PDF file using 'pdfminer.six' library.
This class provides methods to load and parse PDF documents, supporting various configurations such as handling password-protected files,
Load PDF files as HTML content using PDFMiner.
Load and parse a PDF file using 'PyMuPDF' library.
This class provides methods to load and parse PDF documents, supporting various configurations such as handling password-protected files, extr
Load PDF files using Mathpix service.
Load PDF files using pdfplumber.
Load PDF files from a local file system, HTTP or S3.
To authenticate, the AWS client uses the following methods to automatically load credentials: https://boto3.amazonaws.com/v1/documentation/api/l
DedocPDFLoader document loader integration to load PDF files using dedoc.
The file loader can automatically detect the correctness of a textual layer in the
PDF document.
Note that __init__ me
Load a PDF with Azure Document Intelligence
Document loader utilizing Zerox library: https://github.com/getomni-ai/zerox
Zerox converts PDF document to series of images (page-wise) and uses vision-capable LLM model to generate Markdown represe
Load from the Huawei OBS file.
Load geopandas Dataframe.
Base Loader that uses dedoc (https://dedoc.readthedocs.io).
Loader enables extracting text, tables and attached files from the given file:
* Text can be split by pages, dedoc tree nodes, te
DedocFileLoader document loader integration to load files using dedoc.
The file loader automatically detects the file type (with the correct extension). The list of supported file types is gives at
Load files using dedoc API.
The file loader automatically detects the file type (even with the wrong extension).
By default, the loader makes a call to the locally hosted dedoc API.
More informati
Load Quip pages.
Port of https://github.com/quip/quip-api/tree/master/samples/baqup
Load and pars Documents concurrently.
Load model information from Hugging Face Hub, including README content.
This loader interfaces with the Hugging Face Models API to fetch and load model metadata and README files. The API allows you
Generic Document Loader.
A generic document loader that allows combining an arbitrary blob loader with a blob parser.
Examples:
Parse a specific PDF file:
.. code-block:: python
f
Load MongoDB documents.
Load Python files, respecting any non-default encoding if specified.
Base Loader that uses Unstructured.
Load TOML files.
It can load a single source file or several files in a single directory.
Load YouTube urls as audio file(s).
Load blobs in the local file system.
Example:
.. code-block:: python
from langchain_community.document_loaders.blob_loaders import FileSystemBlobLoader
loader = FileSystemBlobLoader("/path/
Load blobs from cloud URL or file:.
Example:
.. code-block:: python
loader = CloudBlobLoader("s3://mybucket/id")
for blob in loader.yield_blobs():
print(blob)
Parser for text blobs.
Transcribe and parse audio files using Azure OpenAI Whisper.
This parser integrates with the Azure OpenAI Whisper model to transcribe audio files. It differs from the standard OpenAI Whisper parser,
Transcribe and parse audio files.
Audio transcription is with OpenAI Whisper model.
Transcribe and parse audio files with OpenAI Whisper model.
Audio transcription with OpenAI Whisper model locally from transformers.
Transcribe and parse audio files. Audio transcription is with OpenAI Whisper model.
Transcribe and parse audio files with faster-whisper.
faster-whisper is a reimplementation of OpenAI's Whisper model using CTranslate2, which is up to 4 times faster than openai/whisper for the same
Loads a PDF with Azure Document Intelligence (formerly Forms Recognizer).
Dataclass to store Document AI parsing results.
Exception raised when the Grobid server is unavailable.
Load article PDF files using Grobid.
Abstract base class for parsing image blobs into text.
Parser for extracting text from images using the RapidOCR library.
Parse for extracting text from images using the Tesseract OCR library.
Parser for analyzing images using a language model (LLM).
A wrapper class that adapts a document loader to function as a parser.
This class is a work-around that adapts a document loader to function as a parser. It is recommended to use a proper parser, if
Parser for vsdx files.
Parse the Microsoft Word documents from a blob.
Parse a blob from a PDF using pypdf library.
This class provides methods to parse a blob from a PDF document, supporting various configurations such as handling password-protected PDFs, extra
Parse a blob from a PDF using pdfminer.six library.
This class provides methods to parse a blob from a PDF document, supporting various configurations such as handling password-protected PDFs
Parse a blob from a PDF using PyMuPDF library.
This class provides methods to parse a blob from a PDF document, supporting various configurations such as handling password-protected PDFs, ext
Parse a blob from a PDF using PyPDFium2 library.
This class provides methods to parse a blob from a PDF document, supporting various configurations such as handling password-protected PDFs, e
Parse PDF with PDFPlumber.
Send PDF files to Amazon Textract and parse them.
For parsing multi-page PDFs, they have to reside on S3.
The AmazonTextractPDFLoader calls the [Amazon Textract Service](https://aws.amazon.com/t
Loads a PDF with Azure Document Intelligence (formerly Form Recognizer) and chunks at character level.
Parser that uses mime-types to parse a blob.
This parser is useful for simple pipelines where the mime-type is sufficient to determine how to parse a blob.
To use, configure handlers based on mime
Code segmenter for COBOL.
Code segmenter for C++.
Abstract class for the code segmenter.
Code segmenter for C#.
Abstract class for CodeSegmenters that use the tree-sitter library.
Parse using the respective programming language syntax.
Each top-level function and class in the code is loaded into separate documents. Furthermore, an extra document is generated, containing the re
Code segmenter for Perl.
Code segmenter for Ruby.
Code segmenter for Kotlin.
Code segmenter for C.
Code segmenter for Java.
Code segmenter for TypeScript.
Code segmenter for SQL. This class uses Tree-sitter to segment SQL code into its constituent statements (e.g., SELECT, CREATE TABLE). It also provides functionality to extract these statements and sim
Code segmenter for Elixir.
Code segmenter for Scala.
Code segmenter for PHP.
Code segmenter for Lua.
Code segmenter for Go.
Code segmenter for Rust.
Code segmenter for Python.
Code segmenter for JavaScript.
Parse HTML files using Beautiful Soup.
Allows a BaseModel to return its fields by string variable indexing.
Choice.
Chat completions.
Choice chunk.
Chat completion chunk.
Chat completion.
Completions.
Chat.
Chat message history backed by Google Firestore.
Chat message history stored in a Xata database.
Chat message history backed by Azure CosmosDB.
Chat message history that stores history in a local file.
Chat message history that uses Zep Cloud as a backend.
Recommended usage::
# Set up Zep Chat History
zep_chat_history = ZepChatMessageHistory(
session_id=session_id,
api_key=
Chat message history that is backed by Cassandra.
Chat message history that stores messages in Streamlit session state.
Chat message history cache that uses Momento as a backend.
See https://gomomento.com/
Chat message history stored in a Redis database.
Chat message history that stores history in AWS DynamoDB.
This class expects that a DynamoDB table exists with name table_name
Uses Rockset to store chat messages.
To use, ensure that the rockset python package installed.
Represents a chat message history stored in a TiDB database.
Convert BaseMessage to the SQLAlchemy model.
The default message converter for SQLChatMessageHistory.
Chat message history stored in an SQL database.
Consume start position for Kafka consumer to get chat history messages. LAST_CONSUMED: Continue from the last consumed offset. EARLIEST: Start consuming from the beginning. LATEST: Start consuming fro
Chat message history stored in Kafka.
Chat message history stored in an Upstash Redis database.
Scope for the document search. Messages or Summaries?
Enumerator of the types of search to perform.
Chat message history that uses Zep as a backend.
Recommended usage::
# Set up Zep Chat History
zep_chat_history = ZepChatMessageHistory(
session_id=session_id,
url=ZEP_API_UR
Chain that requests a URL and then uses an LLM to parse results.
Security Note: This chain can make GET requests to arbitrary URLs, including internal URLs.
Control access to who can run
Routes available for the Pebblo API as enumerator.
Wrapper for Pebblo Retrieval API.
Class for an authorization context.
Class for a semantic entity filter.
Class for a semantic topic filter.
Class for a semantic context.
Input for PebbloRetrievalQA chain.
OS, language details
Langchain framework details
Retrieval Chain with Identity & Semantic Enforcement for question-answering against a vector database.
Chain for question-answering against a graph by generating gremlin statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include ne
Chain for question-answering against a graph by generating nGQL statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include neces
Chain for question-answering against a graph by generating gremlin statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include ne
Question-answering against Ontotext GraphDB https://graphdb.ontotext.com/ by generating SPARQL queries.
Security note: Make sure that the database connection uses credentials that are narrow
Chain for question-answering against a graph by generating AQL statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necess
Question-answering against an RDF or OWL graph by generating SPARQL statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include n
Chain for question-answering against a graph by generating Cypher statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include nec
Chain for question-answering against a graph by generating Cypher statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include nec
Question-answering against a graph by generating Cypher statements for Kùzu.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include nece
Chain for question-answering against a graph.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure
Parse the request and error tags.
Get the request parser.
Chain interacts with an OpenAPI endpoint using natural language.
Parse the response and error tags.
Get the response parser.
A ByteStore implementation using Cassandra as the backend.
BaseStore implementation using Redis as the underlying store.
Base class for the DataStax AstraDB data store.
Table used to save values.
BaseStore interface that works on an SQL database.
BaseStore implementation using Upstash Redis as the underlying store to store raw bytes.
BaseStore implementation using MongoDB as the underlying store.
BaseStore implementation using MongoDB as the underlying store.
KNN retriever.
LangChain API retriever.
`NanoPQ retriever.
Retriever for Kay.ai datasets.
To work properly, expects you to have KAY_API_KEY env variable set. You can get one for free at https://kay.ai/.
SVM retriever.
Largely based on https://github.com/karpathy/randomfun/blob/master/knn_vs_svm.ipynb
Configuration for vector search.
Configuration for retrieval.
Wikipedia API retriever.
Arcee Domain Adapted Language Models (DALMs) retriever.
To use, set the ARCEE_API_KEY environment variable with your Arcee API key,
or pass arcee_api_key as a named parameter.
Zep Cloud MemoryStore Retriever.
Search your user's long-term chat history with Zep.
Zep offers both simple semantic search and Maximal Marginal Relevance (MMR) reranking of search results.
Note:
Azure AI Search service retriever.
Azure Cognitive Search service retriever.
This version of the retriever will soon be
depreciated. Please switch to AzureAISearchRetriever
A retriever class for Breebs.
See https://www.breebs.com/ for more info. Args: breeb_key: The key to trigger the breeb (specialized knowledge pill on a specific topic).
To retrieve the lis
Databerry API retriever.
Google Vertex Search API retriever alias for backwards compatibility.
DEPRECATED: Use GoogleVertexAISearchRetriever instead.
Enumerator of the types of search to perform.
DocArray Document Indices retriever.
Currently, it supports 5 backends: InMemoryExactNNIndex, HnswDocumentIndex, QdrantDocumentIndex, ElasticDocIndex, and WeaviateDocumentIndex.
Search queries to research for the user's goal.
Output parser for a list of numbered questions.
Google Search API retriever.
PubMed API retriever.
It wraps load() to get_relevant_documents(). It uses all PubMedAPIWrapper arguments without any change.
ChatGPT plugin retriever.
TF-IDF retriever.
Largely based on https://github.com/asvskartheek/Text-Retrieval/blob/master/TF-IDF%20Search%20Engine%20(SKLEARN).ipynb
AskNews retriever.
Dria retriever using the DriaAPIWrapper.
Embedchain retriever.
Arxiv retriever.
Zilliz API retriever.
Document retriever that uses ThirdAI's NeuralDB.
BM25 retriever without Elasticsearch.
Information that highlights the keywords in the excerpt.
Text with highlights.
Value of an additional result attribute.
Additional result attribute.
Value of a document attribute.
Document attribute.
Base class of a result item.
Query API result item.
Retrieve API result item.
Amazon Kendra Query API search result.
Amazon Kendra Retrieve API search result.
Milvus API retriever.
See detailed instructions here: https://python.langchain.com/docs/integrations/retrievers/milvus_hybrid_search/
NeedleRetriever retrieves relevant documents or context from a Needle collection based on a search query.
Search depth as enumerator.
Tavily Search API retriever.
Setup:
Install langchain-community and set environment variable TAVILY_API_KEY.
.. code-block:: bash
pip install -U langchain-co
Vespa retriever.
LlamaIndex retriever.
It is used for the question-answering with sources over an LlamaIndex data structure.
LlamaIndex graph data structure retriever.
It is used for question-answering with sources over an LlamaIndex graph data structure.
Retriever for Outline API.
It wraps run() to get_relevant_documents(). It uses all OutlineAPIWrapper arguments without any change.
Elasticsearch retriever that uses BM25.
To connect to an Elasticsearch instance that requires login credentials, including Elastic Cloud, use the Elasticsearch URL format https://username:passwor
Pinecone Hybrid Search retriever.
Rememberizer retriever.
It wraps load() to get_relevant_documents(). It uses all RememberizerAPIWrapper arguments without any change.
You.com Search API retriever.
It wraps results() to get_relevant_documents It uses all YouSearchAPIWrapper arguments without any change.
Chaindesk API retriever.
Metal API retriever.
Which documents to search. Messages or Summaries?
Enumerator of the types of search to perform.
Zep MemoryStore Retriever.
Search your user's long-term chat history with Zep.
Zep offers both simple semantic search and Maximal Marginal Relevance (MMR) reranking of search results.
Note: You w
Infinispan VectorStore interface.
This class exposes the method to present Infinispan as a VectorStore. It relies on the Infinispan class (below) which takes care of the REST interface with the ser
Helper class for Infinispan REST interface.
This class exposes the Infinispan operations needed to create and set up a vector db.
You need a running Infinispan (15+) server without authentication.
Xata vector store.
It assumes you have a Xata database created with the right schema. See the guide at: https://integrations.langchain.com/vectorstores?integration_name=XataVectorStore
MyScale client configuration.
MyScale vector store.
You need a clickhouse-connect python package, and a valid account
to connect to MyScale.
MyScale can not only search with simple vector indexes. It also supports a complex
MyScale vector store without metadata column
This is super handy if you are working to a SQL-native table
ecloud Elasticsearch vector store.
Yellowbrick as a vector database. Example: .. code-block:: python from langchain_community.vectorstores import Yellowbrick from langchain_community.embeddings.openai import OpenAIE
Enumerator for the supported Index types within Yellowbrick.
Parameters for configuring a Yellowbrick index.
Base class for serializing data.
Serialize data in JSON using the json package from python standard library.
Serialize data in Binary JSON using the bson python package.
Serialize data in Apache Parquet format using the pyarrow package.
Exception raised by SKLearnVectorStore.
Simple in-memory vector store based on the scikit-learn library
NearestNeighbors.
DuckDB vector store.
This class provides a vector store interface for adding texts and performing similarity searches using DuckDB.
For more information about DuckDB, see: https://duckdb.org/
Thi
NucliaDB vector store.
AwaDB vector store.
Apache Doris client configuration.
Apache Doris vector store.
You need a pymysql python package, and a valid account
to connect to Apache Doris.
For more information, please visit [Apache Doris official site](https://doris.ap
Vald vector database.
To use, you should have the vald-client-python python package installed.
Annoy vector store.
To use, you should have the annoy python package installed.
Enumerator of the Distance strategies for calculating distances between vectors.
Enumerator of the Search strategies for searching in the vectorstore.
Vespa vector store.
To use, you should have the python client library pyvespa installed.
ManticoreSearch Engine vector store.
To use, you should have the manticoresearch python package installed.
Zep vector store.
It provides methods for adding texts or documents to the store, searching for similar documents, and deleting documents.
Search scores are calculated using cosine similarity norm
Implementation of Vector Store using LLMRails.
See https://llmrails.com/
Retriever for LLMRails.
Base class for Elasticsearch retrieval strategies.
LanceDB vector store.
To use, you should have lancedb python package installed.
You can install it with pip install lancedb.
vikingdb connection config
See the following documentation for details: https://www.volcengine.com/docs/6459/1167770
vikingdb as a vector store
In order to use this you need to have a database instance. See the following documentation for details: https://www.volcengine.com/docs/6459/1167774
TileDB vector store.
To use, you should have the tiledb-vector-search python package installed.
VLite is a simple and fast vector database for semantic search.
Tablestore vector store.
To use, you should have the tablestore python package installed.
TiDB Vector Store.
Azure Cognitive Search vector store.
Retriever that uses Azure Cognitive Search.
Meilisearch vector store.
To use this, you need to have meilisearch python package installed,
and a running Meilisearch instance.
To learn more about Meilisearch Python, refer to the in-depth Me
DocumentDB Similarity Type as enumerator.
Amazon DocumentDB (with MongoDB compatibility) vector store.
Please refer to the official Vector Search documentation for more details:
https://docs.aws.amazon.com/documentdb/latest/developerguide/v
Hologres API vector store.
connection_string is a hologres connection string.embedding_function any embedding function implementing
langchain.embeddings.base.Embeddings interface.Upstash Vector vector store
To use, the upstash-vector python package must be installed.
Also an Upstash Vector index is required. First create a new Upstash Vector index and copy the `index_url
Configuration for summary generation.
is_enabled: True if summary is enabled, False otherwise max_results: maximum number of results to summarize response_lang: requested language for the summary pro
Configuration for Maximal Marginal Relevance (MMR) search. This will soon be deprated in favor of RerankConfig.
is_enabled: True if MMR is enabled, False otherwise mmr_k: number of results to fetc
Configuration for Reranker.
reranker: "mmr", "rerank_multilingual_v1", "udf" or "none" rerank_k: number of results to fetch before reranking, defaults to 50 mmr_diversity_bias: for MMR only - a numbe
Configuration for Vectara query.
k: Number of Documents to return. Defaults to 10. lambda_val: lexical match parameter for hybrid search. filter Dictionary of argument(s) to filter on metadata. For e
Vectara API vector store.
See (https://vectara.com).
Vectara Retriever class.
Vectara RAG runnable.
Amazon OpenSearch Vector Engine vector store.
SemaDB vector store.
This vector store is a wrapper around the SemaDB database.
Rockset vector store.
To use, you should have the rockset python package installed. Note that to use
this, the collection being used must already exist in your Rockset instance.
You must also ens
ClickHouse client configuration.
ClickHouse vector store integration.
Clarifai AI vector store.
To use, you should have the clarifai python SDK package installed.
FAISS vector store integration.
See The FAISS Library paper.
AnalyticDB (distributed PostgreSQL) vector store.
AnalyticDB is a distributed full postgresql syntax cloud-native database.
connection_string is a postgres connection string.Alibaba Cloud Opensearch` client configuration.
Alibaba Cloud OpenSearch vector store.
Aerospike vector store.
To use, you should have the aerospike_vector_search python package installed.
KDB.AI vector store.
See https://kdb.ai.
To use, you should have the kdbai_client python package installed.
Wrapper around Epsilla vector database.
As a prerequisite, you need to install pyepsilla package
and have a running Epsilla vector database (for example, through our docker image)
See the followi
Base model for all SQL stores.
Collection store.
Embedding store.
Result from a query.
Postgres with the pg_embedding extension as a vector store.
pg_embedding uses sequential scan by default. but you can create a HNSW index using the create_hnsw_index method.
connection_stringSQLite with Vec extension as a vector database.
To use, you should have the sqlite-vec python package installed.
Example:
.. code-block:: python
from langchain_community.vectorstores
Enumerator for different search strategies in FalkorDB VectorStore.
SearchType.VECTOR: This option searches using only
the vector indexes in the vectorstore, relying on the
similarity between vecEnumerator of the index types.
FalkorDB vector index.
To use, you should have the falkordb python package installed
Zilliz vector store.
You need to have pymilvus installed and a
running Zilliz database.
See the following documentation for how to run a Zilliz instance: https://docs.zilliz.com/docs/create-clus
Vectorstore that uses ThirdAI's NeuralDB.
To use, you should have the thirdai[neural_db] python package installed.
Vectorstore that uses ThirdAI's NeuralDB Enterprise Python Client for NeuralDBs.
To use, you should have the thirdai[neural_db] python package installed.
Cosmos DB Similarity Type as enumerator.
Cosmos DB Vector Search Type as enumerator.
Azure Cosmos DB for MongoDB vCore vector store.
To use, you should have both:
pymongo python package installedBaidu Elasticsearch vector store.
Base class for the Lantern embedding store.
Result from a query.
Enumerator of the Distance strategies.
Postgres with the lantern extension as a vector store.
lantern uses sequential scan by default. but you can create a HNSW index using the create_hnsw_index method.
connection_string is a postEnumerator of the Distance strategies.
Base model for the SQL stores.
SQLite with VSS extension as a vector database.
To use, you should have the sqlite-vss python package installed.
Example:
.. code-block:: python
from langchain_community.vectorstores
Timescale Postgres vector store
To use, you should have the timescale_vector python package installed.
Enumerator for the supported Index types
Bagel.net Inference platform.
To use, you should have the bagelML python package installed.
Baidu VectorDB Connection params.
See the following documentation for details: https://cloud.baidu.com/doc/VDB/s/6lrsob0wy
Baidu VectorDB table params.
See the following documentation for details: https://cloud.baidu.com/doc/VDB/s/mlrsob0p6
Baidu VectorDB as a vector store.
In order to use this you need to have a database instance. See the following documentation for details: https://cloud.baidu.com/doc/VDB/index.html
Typesense vector store.
To use, you should have the typesense python package installed.
Tencent vector DB Connection params.
See the following documentation for details: https://cloud.tencent.com/document/product/1709/95820
Tencent vector DB Index params.
See the following documentation for details: https://cloud.tencent.com/document/product/1709/95826
MetaData Field for Tencent vector DB.
Tencent VectorDB as a vector store.
In order to use this you need to have a database instance. See the following documentation for details: https://cloud.tencent.com/document/product/1709/104489
Marqo vector store.
Marqo indexes have their own models associated with them to generate your embeddings. This means that you can selected from a range of different models and also use CLIP models
USearch vector store.
To use, you should have the usearch python package installed.
VectorStore connecting to Pathway Vector Store.
SurrealDB as Vector Store.
To use, you should have the surrealdb python package installed.
Atlas vector store.
Atlas is the Nomic's neural database and rhizomatic instrument.
To use, you should have the nomic python package installed.
Relyt (distributed PostgreSQL) vector store.
Relyt is a distributed full postgresql syntax cloud-native database.
connection_string is a postgres connection string.embedding_function any eScaNN vector store.
To use, you should have the scann python package installed.
Tair vector store.
Supabase Postgres vector store.
It assumes you have the pgvector
extension installed and a match_documents (or similar) function. For more details:
https://integrations.langchain.com/vectorstor
Hippo vector store.
You need to install hippo-api and run Hippo.
Please visit our official website for how to run a Hippo instance: https://www.transwarp.cn/starwarp
VectorStore backed by pgvecto_rs.
Momento Vector Index (MVI) vector store.
Momento Vector Index is a serverless vector index that can be used to store and
search vectors. To use you should have the momento python package instal
Enumerator of the Distance strategies.
Some default dimensions for known embeddings.
Kinetica client configuration.
Kinetica vector store.
To use, you should have the gpudb python package installed.
StarRocks client configuration.
StarRocks vector store.
You need a pymysql python package, and a valid account
to connect to StarRocks.
Right now StarRocks has only implemented cosine_similarity function to
compute distance
Dingo vector store.
To use, you should have the dingodb python package installed.
Jaguar API vector store.
See http://www.jaguardb.com See http://github.com/fserv/jaguar-sdk
CosmosDB Query Type
Configuration for a Zep Collection.
If the collection does not exist, it will be created.
Zep vector store.
It provides methods for adding texts or documents to the store, searching for similar documents, and deleting documents.
Search scores are calculated using cosine similarity norm
DashVector vector store.
To use, you should have the dashvector python package installed.
HnswLib storage using DocArray package.
To use it, you should have the docarray package with version >=0.32.0 installed.
You can install it with pip install docarray.
In-memory DocArray storage for exact search.
To use it, you should have the docarray package with version >=0.32.0 installed.
You can install it with pip install docarray.
Base class for DocArray based vector stores.
Distance metrics for Redis vector fields.
Base class for Redis fields.
Schema for text fields in Redis.
Schema for tag fields in Redis.
Schema for numeric fields in Redis.
Base class for Redis vector fields.
Schema for flat vector fields in Redis.
Schema for HNSW vector fields in Redis.
Schema for Redis index.
RedisFilterOperator enumerator is used to create RedisFilterExpressions.
Collection of RedisFilterFields.
Base class for RedisFilterFields.
RedisFilterField representing a tag in a Redis index.
RedisFilterField representing a numeric field in a Redis index.
RedisFilterField representing a text field in a Redis index.
Logical expression of RedisFilterFields.
RedisFilterExpressions can be combined using the & and | operators to create complex logical expressions that evaluate to the Redis Query language.
This pres
Retriever for Redis VectorStore.
Document compressor that uses Jina Rerank API.
Document compressor using Flashrank interface.
Document compressor using Flashrank interface.
Document compressor that uses Infinity Rerank API.
Document compressor that uses Volcengine Rerank API.
Compress using LLMLingua Project.
https://github.com/microsoft/LLMLingua
Request for reranking.
OpenVINO rerank models.
Document compressor that uses DashScope Rerank API.
Helper for executing an MMR traversal query.
A link to/from a tag of a given kind.
Documents in a :class:graph vector store <langchain_community.graph_vectorstores.base.GraphVectorStore>
are connected via "links".
Links form a bipartite graph
Link documents with common named entities using GLiNER_.
GLiNER_ is a Named Entity Recognition (NER) model capable of identifying any
entity type using a bidirectional transformer encoder (BERT-l
DocumentTransformer for applying one or more LinkExtractors.
Interface for extracting links (incoming, outgoing, bidirectional).
Select and order examples based on ngram overlap score (sentence_bleu score
from NLTK package).
https://www.nltk.org/_modules/nltk/translate/bleu_score.html https://aclanthology.org/P02-1040.pdf
Callback Handler that tracks bedrock anthropic info.
Callback handler that is used within a Flyte task.
Callback Handler that logs into deepeval.
Handle the metadata and associated function states for callbacks.
Context manager for LLMonitor user context.
Callback Handler for LLMonitor`.
Parameters:
- `app_id`: The app id of the app you want to report to. Defaults to
`None`, which means that `LLMONITOR_APP_ID` will be used.
- `api_url
Label Studio mode enumerator.
Label Studio callback handler. Provides the ability to send predictions to Label Studio for human evaluation, feedback and annotation.
Callback Handler that logs into Argilla.
Callback Handler that logs to Arize.
Callback Handler that records transcripts to the Context service.
(https://context.ai).
Callback Handler that logs to Infino.
The UpTrain data schema for tracking evaluation results.
Callback Handler that logs evaluation results to uptrain and the console.
Callback Handler that logs to Arthur platform.
Arthur helps enterprise teams optimize model operations and performance at scale. The Arthur API tracks model performance, explainability, and fairness
Callback Handler that logs to ClearML.
Token type enum.
Callback Handler that tracks OpenAI info.
Callback Handler for logging to WhyLabs. This callback handler utilizes
langkit to extract features from the prompts & responses when interacting with
an LLM. These features can be used to guardrail
Callback Handler that logs metrics and artifacts to mlflow server.
Callback Handler that logs metrics and artifacts to mlflow server.
Upstash Ratelimit Error
Raised when the rate limit is reached in UpstashRatelimitHandler
Callback to handle rate limiting based on the number of requests or the number of tokens in the input.
It uses Upstash Ratelimit to track the ratelimit which utilizes Upstash Redis to track the state
Callback handler for Trubrics.
Callback Handler that logs prompt artifacts and metrics to SageMaker Experiments.
Callback Handler that logs to Weights and Biases.
Callback handler for promptlayer.
Exception to raise when a person manually review and rejects a value.
Callback for manually validating values.
Asynchronous callback for manually validating values.
Callback handler for the metadata and associated function states for callbacks.
Callback Handler that logs to Aim.
Callback Handler that logs to Comet.
Arguments for the WandbTracer.
Callback Handler that logs to Weights and Biases.
This handler will log the model architecture and run traces to Weights and Biases. This will ensure that all LangChain activity is logged to W&B.
Comet Tracer.
Enumerator of the LLMThought state.
Tool record as a NamedTuple.
Generates markdown labels for LLMThought containers. Pass a custom subclass of this to StreamlitCallbackHandler to override its default labeling logic.
A thought in the LLM's thought stream.
Callback handler that writes to a Streamlit app.
Enumerator of the child type.
Child record as a NamedTuple.
Streamlit expander that can be renamed and dynamically expanded/collapsed.
Run an OpenAI Assistant.
Nebula Service models.
To use, you should have the environment variable NEBULA_SERVICE_URL,
NEBULA_SERVICE_PATH and NEBULA_API_KEY set with your Nebula
Service, or pass it as a named para
Model inference on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and SSH credentials (suc
NLPCloud large language models.
To use, you should have the nlpcloud python package installed, and the
environment variable NLPCLOUD_API_KEY set with your API key.
Writer large language models.
To use, you should have the writer-sdk Python package installed, and the
environment variable WRITER_API_KEY set with your API key.
LLM that uses OpaquePrompts to sanitize prompts.
Wraps another LLM and sanitizes prompts before passing it to the LLM, then de-sanitizes the response.
To use, you should have the ``opaqueprompts
OctoAI LLM Endpoints - OpenAI compatible.
OctoAIEndpoint is a class to interact with OctoAI Compute Service large language model endpoints.
To use, you should have the environment variable ``OCTOAI_
Modal large language models.
To use, you should have the modal-client python package installed.
Any parameters that are valid to be passed to the call can be passed in, even if not explicitly sa
C Transformers LLM models.
To use, you should have the ctransformers python package installed.
See https://github.com/marella/ctransformers
Raises when token expired.
Raises when encounter server error when making inference.
Base class for LLM deployed on OCI Data Science Model Deployment.
LLM deployed on OCI Data Science Model Deployment.
To use, you must provide the model HTTP endpoint from your deployed
model, e.g. https://modeldeployment.
OCI Data Science Model Deployment TGI Endpoint.
To use, you must provide the model HTTP endpoint from your deployed
model, e.g. https://modeldeployment.
VLLM deployed on OCI Data Science Model Deployment
To use, you must provide the model HTTP endpoint from your deployed
model, e.g. https://modeldeployment.
OpenAI's compatible API client for OpenLLM server
.. versionchanged:: 0.2.11
Changed in 0.2.11 to support OpenLLM 0.6. Now behaves similar to OpenAI wrapper.
Layerup Security LLM service.
HuggingFace Pipeline API to run on self-hosted remote hardware.
Supported hardware includes auto-launched instances on AWS, GCP, Azure, and Lambda, as well as servers specified by IP address and SSH
Cloudflare Workers AI service.
To use, you must provide an API token and account ID to access Cloudflare Workers AI, and pass it as a named parameter to the constructor.
GooseAI large language models.
To use, you should have the openai python package installed, and the
environment variable GOOSEAI_API_KEY set with your API key.
Any parameters that are valid
Common parameters for Moonshot LLMs.
Moonshot large language models.
To use, you should have the environment variable MOONSHOT_API_KEY set with your
API key. Referenced from https://platform.moonshot.cn/docs
Base class for VolcEngineMaas models.
volc engine maas hosts a plethora of models. You can utilize these models through this class.
To use, you should have the volcengine python package installed.
and set access key and secret key by
PromptLayer OpenAI large language models.
To use, you should have the openai and promptlayer python
package installed, and the environment variable OPENAI_API_KEY
and ``PROMPTLAYER_API_KE
PromptLayer OpenAI large language models.
To use, you should have the openai and promptlayer python
package installed, and the environment variable OPENAI_API_KEY
and ``PROMPTLAYER_API_KE
Adapter class to prepare the inputs from Langchain to a format that LLM model expects.
It also provides helper function to extract the generated text from the model response.
Base class for Bedrock models.
llama.cpp model.
To use, you should have the llama-cpp-python library installed, and provide the path to the Llama model as a named parameter to the constructor. Check out: https://github.com/abetlen
Arcee's Domain Adapted Language Models (DALMs).
To use, set the ARCEE_API_KEY environment variable with your Arcee API key,
or pass arcee_api_key as a named parameter.
Replicate models.
To use, you should have the replicate python package installed,
and the environment variable REPLICATE_API_TOKEN set with your API token.
You can find your token here: https
ForefrontAI large language models.
To use, you should have the environment variable FOREFRONTAI_API_KEY
set with your API key.
Llamafile lets you distribute and run large language models with a single file.
To get started, see: https://github.com/Mozilla-Ocho/llamafile
To use this class, you will need to first:
Raised when the Ollama endpoint is not found.
VLLM language model.
vLLM OpenAI-compatible API client
Text generation models from WebUI.
To use, you should have the text-generation-webui installed, a model loaded, and --api added as a command-line option.
Suggested installation, use one-click instal
Weight only quantized model.
To use, you should have the intel-extension-for-transformers packabge and
transformers package installed.
intel-extension-for-transformers:
https://github.com
Use your Predibase models with Langchain.
To use, you should have the predibase python package installed,
and have your Predibase API key.
The model parameter is the Predibase "serverless" bas
Fake LLM for testing purposes.
Fake streaming list LLM for testing purposes.
Parameters for the Javelin AI Gateway LLM.
Javelin AI Gateway LLMs.
To use, you should have the javelin_sdk python package installed.
For more information, see https://docs.getjavelin.io
Petals Bloom models.
To use, you should have the petals python package installed, and the
environment variable HUGGINGFACE_API_KEY set with your API key.
Any parameters that are valid to be
EdenAI models.
To use, you should have
the environment variable EDENAI_API_KEY set with your API token.
You can find your token here: https://app.edenai.run/admin/account/settings
feature and
Konko AI models.
To use, you'll need an API key. This can be passed in as init param
konko_api_key or set as environment variable KONKO_API_KEY.
Konko AI API reference: https://docs.konko.ai
The device to use for inference, cuda or cpu
Configuration for the reader to be deployed in Titan Takeoff API.
Titan Takeoff API LLMs.
Titan Takeoff is a wrapper to interface with Takeoff Inference API for generative text to text language models.
You can use this wrapper to send requests to a generative lang
ExllamaV2 API.
To use, you should have the exllamav2 library installed, and provide the path to the Llama model as a nam
OpenLM models.
Train result.
Gradient.ai LLM Endpoints.
GradientLLM is a class to interact with LLMs on gradient.ai
To use, set the environment variable GRADIENT_ACCESS_TOKEN with your
API token and ``GRADIENT_WORKSPACE_ID`
Aviary backend.
Aviary hosted models.
Aviary is a backend for hosted models. You can find out more about aviary at http://github.com/ray-project/aviary
To get a list of the models supported on an aviary, follow the
Baidu Qianfan completion model integration.
Parse the byte stream input.
The output of the model will be in the following format:
b'{"outputs": [" a"]}
' b'{"outputs": [" challenging"]} ' b'{"outputs": [" problem"]} ' ...
Handler class to transform input from LLM to a format that SageMaker endpoint expects.
Similarly, the class handles transforming output from the SageMaker endpoint to a format that LLM class expects.
Content handler for LLM class.
GigaChat large language models API.
To use, you should pass login and password to access GigaChat API or use token.
Parameters for AI21 penalty data.
AI21 large language models.
To use, you should have the environment variable AI21_API_KEY
set with your API key or pass it as a named parameter to the constructor.
Clarifai large language models.
To use, you should have an account on the Clarifai platform,
the clarifai python package installed, and the
environment variable CLARIFAI_PAT set with your PAT
PipelineAI large language models.
To use, you should have the pipeline-ai python package installed,
and the environment variable PIPELINE_API_KEY set with your API key.
Any parameters that a
Banana large language models.
To use, you should have the banana-dev python package installed,
and the environment variable BANANA_API_KEY set with your API key.
This is the team API key avai
NIBittensor LLMs
NIBittensorLLM is created by Neural Internet (https://neuralinternet.ai/), powered by Bittensor, a decentralized network full of different AI models.
To analyze API_KEYS and logs of
Yuan2.0 language models.
IpexLLM model.
Common parameters for Minimax large language models.
Minimax large language models.
To use, you should have the environment variable
MINIMAX_API_KEY and MINIMAX_GROUP_ID set with your API key,
or pass them as a named parameter to the constructo
Kobold API language model.
It includes several fields that can be used to control the text generation process.
To use this class, instantiate it with the required parameters and call it with a promp
Anyscale large language models.
To use, you should have the environment variable ANYSCALE_API_KEYset with your
Anyscale Endpoint, or pass it as a named parameter to the constructor.
To use with A
Base OpenAI large language model class.
Common configuration for Solar LLMs.
Solar large language models.
To use, you should have the environment variable
SOLAR_API_KEY set with your API key.
Referenced from https://console.upstage.ai/services/solar
MLX Pipeline API.
To use, you should have the mlx-lm python package installed.
ChatGLM3 LLM service.
DeepInfra models.
To use, you should have the environment variable DEEPINFRA_API_TOKEN
set with your API token, or pass it as a named parameter to the
constructor.
Only supports `text-generation
HazyResearch's Manifest library.
StochasticAI large language models.
To use, you should have the environment variable STOCHASTICAI_API_KEY
set with your API key.
CTranslate2 language model.
Base class of Friendli.
Friendli LLM.
friendli-client package should be installed with pip install friendli-client.
You must set FRIENDLI_TOKEN environment variable or provide the value of your
personal access tok
AzureML Managed Endpoint client.
Azure ML endpoints API types. Use dedicated for models deployed in hosted
infrastructure (also known as Online Endpoints in Azure Machine Learning),
or serverless for models deployed as a service
Transform request and response of AzureML endpoint to match with required schema.
Content handler for GPT2
Deprecated: Kept for backwards compatibility
Content handler for LLMs from the OSS catalog.
Content handler for LLMs from the HuggingFace catalog.
Content handler for the Dolly-v2-12b model
Content formatter for models that use the OpenAI like API scheme.
Deprecated: Kept for backwards compatibility
Content formatter for Llama.
Azure ML Online Endpoint models.
Azure ML Online Endpoint models.
Tongyi completion model integration.
Baichuan large language models.
Yi large language models.
OCI authentication types as enumerator.
Base class for OCI GenAI models
OCI large language models.
To authenticate, the OCI client uses the methods described in https://docs.oracle.com/en-us/iaas/Content/API/Concepts/sdk_authentication_methods.htm
The authentifcation me
GPT4All language models.
To use, you should have the gpt4all python package installed, the
pre-trained model file, and the model's config information.
ChatGLM LLM service.
Adapter to prepare the inputs from Langchain to a format that LLM model expects.
It also provides helper function to extract the generated text from the model response.
Amazon API Gateway to access LLM models hosted on AWS.
MLflow LLM service.
To use, you should have the mlflow[genai] python package installed.
For more information, see https://mlflow.org/docs/latest/llms/deployments.
MosaicML LLM service.
To use, you should have the
environment variable MOSAICML_API_TOKEN set with your API token, or pass
it as a named parameter to the constructor.
LLM wrapper for the Outlines library.
Neural Magic DeepSparse LLM interface.
To use, you should have the deepsparse or deepsparse-nightly
python package installed. See https://github.com/neuralmagic/deepsparse
This interface let's
Parameters for the MLflow AI Gateway LLM.
MLflow AI Gateway LLMs.
To use, you should have the mlflow[gateway] python package installed.
For more information, see https://mlflow.org/docs/latest/gateway/index.html.
Yandex large language models.
To use, you should have the yandexcloud python package installed.
There are two authentication options for the service account
with the ai.languageModels.user r
User input as the response.
Aphrodite language model.
Wrapper around the BigdlLLM model
Wrapper around You.com's conversational Smart and Research APIs.
Each API endpoint is designed to generate conversational responses to a variety of query types, including inline citations and web res
iFlyTek Spark completion model integration.
Langchain LLM class to help to access eass llm service.
To use this endpoint, must have a deployed eas chat llm service on PAI AliCloud.
One can set the environment variable eas_service_url a
Beam API for gpt2 large language model.
To use, you should have the beam-sdk python package installed,
and the environment variable BEAM_CLIENT_ID set with your client id
and ``BEAM_CLIENT_SE
Xinference large-scale model inference service.
To use, you should have the xinference library installed:
.. code-block:: bash
pip install "xinference[all]"
If you're simply using the service
RWKV language models.
To use, you should have the rwkv python package installed, the
pre-trained model file, and the model's config information.
CerebriumAI large language models.
To use, you should have the cerebrium python package installed.
You should also have the environment variable CEREBRIUMAI_API_KEY
set with your API key or p
Aleph Alpha large language models.
To use, you should have the aleph_alpha_client python package installed, and the
environment variable ALEPH_ALPHA_API_KEY set with your API key, or pass
it
SambaStudio large language models.
SambaNova Cloud large language models.
Toolkit for Azure AI Services.
Toolkit for Azure Cognitive Services.
Schema for operations that do not require any input.
Schema for operations that require an issue number as input.
Schema for operations that require a comment as input.
Schema for operations that require a PR number as input.
Schema for operations that require a PR title and body as input.
Schema for operations that require a file path and content as input.
Schema for operations that require a file path as input.
Schema for operations that require a file path and content as input.
Schema for operations that require a file path as input.
Schema for operations that require a directory path as input.
Schema for operations that require a branch name as input.
Schema for operations that require a search query as input.
Schema for operations that require a username as input.
Schema for operations that require a search query as input.
Schema for operations that require a tag name as input.
GitHub Toolkit.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by creating, deleting, or updating, reading underlying data.
For examp
Jira Toolkit.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by creating, deleting, or updating, reading underlying data.
See https:/
Toolkit for interacting with Power BI dataset.
Security Note: This toolkit interacts with an external service.
Control access to who can use this toolkit.
Make sure that the capabilities
Natural Language API Toolkit.
Security Note: This toolkit creates tools that enable making calls to an Open API compliant API.
The tools created by this toolkit may be able to make GET, PO
Natural Language API Tool.
Toolkit for interacting with the Browser Agent.
Security Note: This toolkit contains tools that interact with the user's browser via the multion API which grants an agent access to the us
Clickup Toolkit.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by reading, creating, updating, deleting data associated with this service
Toolkit for interacting with Spark SQL.
Toolkit for interacting with AINetwork Blockchain.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by reading, creating, updating, deleting
Toolkit for interacting with Office 365.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by reading, creating, updating, deleting data asso
Toolkit for interacting with a JSON spec.
Polygon Toolkit.
Toolkit for interacting with local files.
Security Notice: This toolkit provides methods to interact with local files. If providing this toolkit to an agent on an LLM, ensure you scope the
Nasa Toolkit.
Steam Toolkit.
Toolkit with a list of Connery Actions as tools.
GitLab Toolkit.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by creating, deleting, or updating, reading underlying data.
For examp
Zapier Toolkit.
Toolkit for interacting with Amadeus which offers APIs for travel.
Toolkit for interacting with Gmail.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by reading, creating, updating, deleting data associate
Toolkit for interacting with Slack.
Toolkit for PlayWright browser tools.
Security Note: This toolkit provides code to control a web-browser.
Careful if exposing this toolkit to end-users. The tools in the toolkit
are capa
Toolkit for interacting with financialdatasets.ai.
Toolkit for interacting with an Apache Cassandra database.
Toolkit for CogniSwitch.
Use the toolkit to get all the tools present in the Cogniswitch and use them to interact with your knowledge.
Toolkit for making REST requests.
Security Note: This toolkit contains tools to make GET, POST, PATCH, PUT, and DELETE requests to an API.
Exercise care in who is allowed to use this toolk
Toolkit for interacting with an OpenAPI API.
Security Note: This toolkit contains tools that can read and modify the state of a service; e.g., by creating, deleting, or updating, reading un
A reduced OpenAPI spec.
This is a quick and dirty representation for OpenAPI specs.
Requests GET tool with LLM-instructed extraction of truncated responses.
Requests POST tool with LLM-instructed extraction of truncated responses.
Requests PATCH tool with LLM-instructed extraction of truncated responses.
Requests PUT tool with LLM-instructed extraction of truncated responses.
Tool that sends a DELETE request and parses the response.
SQLDatabaseToolkit for interacting with SQL databases.
Functionality to create graph index.
Represents a node in a graph with associated properties.
Represents a directed relationship between two nodes in a graph.
Represents a graph document consisting of nodes and relationships.
FalkorDB wrapper for graph operations.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure to do s
ArangoDB wrapper for graph operations.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure to do s
HugeGraph wrapper for graph operations.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure to do
RDFlib wrapper for graph operations.
Modes:
Abstract class for graph operations.
Memgraph wrapper for graph operations.
Parameters: url (Optional[str]): The URL of the Memgraph database server. username (Optional[str]): The username for database authentication. password (Optional
Knowledge triple in the graph.
Networkx wrapper for entity graph operations.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure
NebulaGraph wrapper for graph operations.
NebulaGraph inherits methods from Neo4jGraph to bring ease to the user space.
Security note: Make sure that the database connection uses credentials t
Ontotext GraphDB https://graphdb.ontotext.com/ wrapper for graph operations.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include nece
TigerGraph wrapper for graph operations.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure to do
Exception for the AGE queries.
Apache AGE wrapper for graph operations.
Exception for the Neptune queries.
Abstract base class for Neptune.
Gremlin wrapper for graph operations.
Parameters: url (Optional[str]): The URL of the Gremlin database server or env GREMLIN_URI username (Optional[str]): The collection-identifier like '/dbs/databas
Kùzu wrapper for graph operations.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include necessary permissions. Failure to do so ma
Load chat sessions from a list of LangSmith "llm" runs.
Load chat sessions from a LangSmith dataset with the "chat" data type.
Load chat sessions from the iMessage chat.db SQLite file.
It only works on macOS when you have iMessage enabled and have the chat.db file.
The chat.db file is likely located at ~/Library/Messages/
Load WhatsApp conversations from a dump zip file or directory.
Load Facebook Messenger chat data from a single file.
Load Facebook Messenger chat data from a folder.
Load telegram conversations to LangChain chat messages.
To export, use the Telegram Desktop app from https://desktop.telegram.org/, select a conversation, click the three dots in the top right corn
Load Slack conversations from a dump zip file.
Table used to keep track of when a key was last updated.
A SQL Alchemy based implementation of the record manager.
A MongoDB based implementation of the document manager.
Abstract base class for a record manager.
Translate MyScale internal query language elements to valid filters.
Translate Pinecone internal query language elements to valid filters.
Translate Weaviate internal query language elements to valid filters.
Translate Elasticsearch internal query language elements to valid filters.
Translate Chroma internal query language elements to valid filters.
Translate Vectara internal query language elements to valid filters.
Visitor for translating structured queries to Redis filter expressions.
Translate AstraDB internal query language elements to valid filters.
Translate Mongo internal query language elements to valid filters.
Translate Milvus internal query language elements to valid filters.
Translate DeepLake internal query language elements to valid filters.
Translate PGVector internal query language elements to valid filters.
Translate OpenSearch internal query domain-specific
language elements to valid filters.
Translate Qdrant internal query language elements to valid filters.
Translate the internal query language elements to valid filters.
Translate StructuredQuery to Tencent VectorDB query.
Translate Langchain filters to Supabase PostgREST filters.
Translate DingoDB internal query language elements to valid filters.
Translate Databricks vector search internal query language elements to
valid filters.
Logic for converting internal query language elements to valid filters.
Nebula chat large language model - https://docs.symbl.ai/docs/nebula-llm
API Reference: https://docs.symbl.ai/reference/nebula-chat
To use, set the environment variable NEBULA_API_KEY,
or pass
Writer chat model.
To use, you should have the writer-sdk Python package installed, and the
environment variable WRITER_API_KEY set with your API key or pass 'api_key'
init param.
ZhipuAI chat model integration.
Dappier chat large language models.
Dappier is a platform enabling access to diverse, real-time data models.
Enhance your AI applications with Dappier's pre-trained, LLM-ready data models
and ens
MLX chat models.
Works with MLXPipeline LLM.
To use, you should have the mlx-lm python package installed.
NCP ClovaStudio Chat Completion API.
following environment variables set or passed in constructor in lower case:
NCP_CLOVASTUDIO_API_KEYNCP_APIGW_API_KEYChatCoze chat models API by coze.com
For more information, see https://www.coze.com/open/docs/chat
Moonshot chat model integration.
Volc Engine Maas hosts a plethora of models.
You can utilize these models through this class.
To use, you should have the volcengine python package installed.
and set access key and secret key b
PromptLayer and OpenAI Chat large language models API.
To use, you should have the openai and promptlayer python
package installed, and the environment variable OPENAI_API_KEY
and ``P
Chat with LLMs via llama-api-server
For the information about llama-api-server, visit https://github.com/second-state/LlamaEdge
llama.cpp model.
To use, you should have the llama-cpp-python library installed, and provide the path to the Llama model as a named parameter to the constructor. Check out: https://github.com/abetlen
Reka chat large language models.
Jina AI Chat models API.
To use, you should have the openai python package installed, and the
environment variable JINACHAT_API_KEY set to your API key, which you
can generate at https://ch
Fake ChatModel for testing purposes.
Fake ChatModel for testing purposes.
Parameters for the Javelin AI Gateway LLM.
Javelin AI Gateway chat models API.
To use, you should have the javelin_sdk python package installed.
For more information, see https://docs.getjavelin.io
EdenAI chat large language models.
EdenAI is a versatile platform that allows you to access various language models
from different providers such as Google, OpenAI, Cohere, Mistral and more.
To
ChatKonko Chat large language models API.
To use, you should have the konko python package installed, and the
environment variable KONKO_API_KEY and OPENAI_API_KEY set with your API key
Baidu Qianfan chat model integration.
MariTalk Chat models API.
This class allows interacting with the MariTalk chatbot API. To use it, you must provide an API key either through the constructor.
Yuan2.0 Chat models API.
To use, you should have the openai-python package installed, if package
not installed, using pip install openai to install it. The
environment variable ``YUAN2_AP
MiniMax chat model integration.
Error with the PremAI API.
PremAI Chat models.
To use, you will need to have an API key. You can find your existing API Key or generate a new one here: https://app.premai.io/api_keys/
Anyscale Chat large language models.
See https://www.anyscale.com/ for information about Anyscale.
To use, you should have the openai python package installed, and the
environment variable ``A
Exception raised when the DeepInfra API returns an error.
A chat model that uses the DeepInfra API.
Error with the GPTRouter APIs
GPTRouter model.
GPTRouter by Writesonic Inc.
For more information, see https://gpt-router.writesonic.com/docs
Error with the Google PaLM API.
Google PaLM Chat models API.
To use you must have the google.generativeai Python package installed and either:
1. The ``GOOGLE_API_KEY`` environment variable set with your API key, or
2. P
Friendli LLM for chat.
friendli-client package should be installed with pip install friendli-client.
You must set FRIENDLI_TOKEN environment variable or provide the value of your
personal a
Content formatter for LLaMA.
Chat Content formatter for models with OpenAI like API scheme.
Deprecated: Kept for backwards compatibility
Chat Content formatter for Llama.
Content formatter for Mistral.
Azure ML Online Endpoint chat models.
Error with Snowpark client.
Snowflake Cortex based Chat model
To use the chat model, you must have the snowflake-snowpark-python Python
package installed and either:
1. environment variables set with your snowflake cre
OctoAI Chat large language models.
See https://octo.ai/ for information about OctoAI.
To use, you should have the openai python package installed and the
environment variable ``OCTOAI_API_TOKEN`
Alibaba Tongyi Qwen chat model integration.
Baichuan chat model integration.
Yi chat models API.
ChatOCIGenAI chat model integration.
MLflow chat models API.
To use, you should have the mlflow[genai] python package installed.
For more information, see https://mlflow.org/docs/latest/llms/deployments.
OCI Data Science Model Deployment chat model integration.
Prerequisite The OCI Model Deployment plugins are installable only on python version 3.9 and above. If you're working ins
OCI large language chat models deployed with vLLM.
To use, you must provide the model HTTP endpoint from your deployed
model, e.g. https://modeldeployment.us-ashburn-1.oci.customer-oci.com/
OCI large language chat models deployed with Text Generation Inference.
To use, you must provide the model HTTP endpoint from your deployed model, e.g. https://modeldeployment.us-ashburn-1.oci.custom
Outlines chat model integration.
Parameters for the MLflow AI Gateway LLM.
MLflow AI Gateway chat models API.
To use, you should have the mlflow[gateway] python package installed.
For more information, see https://mlflow.org/docs/latest/gateway/index.html.
YandexGPT large language models.
There are two authentication options for the service account
with the ai.languageModels.user role:
- You can specify the token in a constructor parameter `iam
Tencent Hunyuan chat models API by Tencent.
For more information, see https://cloud.tencent.com/document/product/1729
Kinetica utility functions.
Kinetica LLM Chat Model API.
Prerequisites for using this API:
gpudb and typeguard packages installed.KINETICA_URLResponse containing SQL and the fetched data.
This object is returned by a chain with KineticaSqlOutputParser and it contains
the generated SQL and related Pandas Dataframe fetched from the datab
Fetch and return data from the Kinetica LLM.
This object is used as the last element of a chain to execute generated SQL and it
will output a KineticaSqlResponse containing the SQL and a pandas d
ChatModel which returns user input as the response.
EverlyAI Chat large language models.
To use, you should have the openai python package installed, and the
environment variable EVERLYAI_API_KEY set with your API key.
Alternatively, you can
IFlyTek Spark chat model integration.
Alibaba Cloud PAI-EAS LLM Service chat model API.
To use, must have a deployed eas chat llm service on AliCloud. One can set the
environment variable eas_service_url and eas_service_token
Translate text documents using doctran.
Converts HTML documents to Markdown format with customizable options for handling links, images, other tags and heading styles using the markdownify library.
Extract properties from text documents using doctran.
Transform HTML content by extracting specific tags and removing unwanted ones.
Filter that drops redundant documents by comparing their embeddings.
Perform K-means clustering on document vectors. Returns an arbitrary number of documents closest to center.
Nuclia Text Transformer.
The Nuclia Understanding API splits into paragraphs and sentences, identifies entities, provides a summary of the text and generates embeddings for all sentences.
Extract QA from text documents using doctran.
Replace occurrences of a particular search pattern with a replacement string
Extract metadata tags from document contents using OpenAI functions.
Example: .. code-block:: python
from langchain_openai import ChatOpenAI
from langchai
Reorder long context.
Lost in the middle: Performance degrades when models must access relevant information in the middle of long contexts. See: https://arxiv.org/abs//2307.03172
Cache that uses SingleStore DB as a backend
Wrapper around Apify.
To use, you should have the apify-client python package installed,
and the environment variable APIFY_API_TOKEN set with your API key, or pass
apify_api_token as a name
Wrapper for Google Search API.
Adapted from: Instructions adapted from https://stackoverflow.com/questions/ 37083058/ programmatically-searching-google-in-python-using-custom-search
TODO: DOCS for u
Cohere embedding models.
To use, you should have the cohere python package installed, and the
environment variable COHERE_API_KEY set with your API key or pass it
as a named parameter to the
Cloudflare Workers AI embedding model.
To use, you need to provide an API token and account ID to access Cloudflare Workers AI.
Bedrock embedding models.
To authenticate, the AWS client uses the following methods to automatically load credentials: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
Ernie Embeddings V1 embedding models.
Elasticsearch embedding models.
This class provides an interface to generate embeddings using a model deployed in an Elasticsearch cluster. It requires an Elasticsearch connection object and the mode
Ollama locally runs large language models.
To use, follow the instructions at https://ollama.ai/.
Google Cloud VertexAI embedding models.
Clova's embedding service.
To use this service,
you should have the following environment variables set with your API tokens and application ID, or pass them as named parameters to the constructor:
HuggingFaceHub embedding models.
To use, you should have the huggingface_hub python package installed, and the
environment variable HUGGINGFACEHUB_API_TOKEN set with your API token, or pass
i
NeMo embedding models.
GigaChat Embeddings models.
HuggingFace sentence_transformers embedding models.
To use, you should have the sentence_transformers python package installed.
Wrapper around sentence_transformers embedding models.
To use, you should have the sentence_transformers
and InstructorEmbedding python packages installed.
HuggingFace sentence_transformers embedding models.
To use, you should have the sentence_transformers python package installed.
To use Nomic, make sure the version of sentence_transformers >=
Embed texts using the HuggingFace API.
Requires a HuggingFace Inference API key and a model name.
Get Embeddings
Azure OpenAI Embeddings API.
OpenAI embedding models.
To use, you should have the openai python package installed, and the
environment variable OPENAI_API_KEY set with your API key or pass it
as a named parameter to the
Solar's embedding service.
To use, you should have the environment variableSOLAR_API_KEY set
with your API token, or pass it as a named parameter to the constructor.
Voyage embedding models.
To use, you should have the environment variable VOYAGE_API_KEY set with
your API key or pass it as a named parameter to the constructor.
SambaNova embedding models.
To use, you should have the environment variables
SAMBASTUDIO_EMBEDDINGS_BASE_URL, SAMBASTUDIO_EMBEDDINGS_BASE_URI
SAMBASTUDIO_EMBEDDINGS_PROJECT_ID, ``SAMBAST
Databricks embeddings.
To use, you should have the mlflow python package installed.
For more information, see https://mlflow.org/docs/latest/llms/deployments.
Equivalent stub to QuerySQLDatabaseTool for backwards compatibility. :private:
Tool that queries the Google Cloud Text to Speech API.
In order to set this up, follow instructions at: https://cloud.google.com/text-to-speech/docs/before-you-begin
Tool that queries the Tavily Search API and gets back json.
Setup:
Install langchain-openai and tavily-python, and set environment variable TAVILY_API_KEY.
.. code-bl
Tool that queries the Tavily Search API and gets back an answer.
Tool that queries the Metaphor Search API and gets back json.
Load from oracle adb
Autonomous Database connection can be made by either connection_string or tns name. wallet_location and wallet_password are required for TLS connection. Each document will repres
Load from Azure Blob Storage container.
Load from Docugami.
To use, you should have the dgml-utils python package installed.
Load from Azure Blob Storage files.
Load Google Docs from Google Drive.
Read documents using OracleDocLoader Args: conn: Oracle Connection, params: Loader parameters.
Splitting text using Oracle chunker.
Load datasets from Apify web scraping, crawling, and data extraction platform.
For details, see https://docs.apify.com/platform/integrations/langchain
Load from GCS file.
Loader for Google Cloud Speech-to-Text audio transcripts.
It uses the Google Cloud Speech-to-Text API to transcribe audio files and loads the transcribed text into one or more Documents, depending on
Load from GCS directory.
Load from the Google Cloud Platform BigQuery.
Each document represents one row of the result. The page_content_columns
are written into the page_content of the document. The metadata_columns
Load files using Unstructured.
The file loader uses the unstructured partition function and will automatically detect the file type. You can run the loader in different modes: "single", "elements",
Load files using Unstructured API.
By default, the loader makes a call to the hosted Unstructured API. If you are running the unstructured API locally, you can change the API rule by passing in the
Load file-like objects opened in read mode using Unstructured.
The file loader uses the unstructured partition function and will automatically detect the file type. You can run the loader in differ
Send file-like objects with unstructured-client sdk to the Unstructured API.
By default, the loader makes a call to the hosted Unstructured API. If you are running the unstructured API locally, you
Google Cloud Document AI parser.
For a detailed explanation of Document AI, refer to the product documentation. https://cloud.google.com/document-ai/docs/overview
Chat message history stored in a Postgres database.
DEPRECATED: This class is deprecated and will be removed in a future version.
Use the PostgresChatMessageHistory implementation in `langchai
Chat message history stored in a SingleStoreDB database.
Chat message history that stores history in Elasticsearch.
Chain for question-answering against a graph by generating Cypher statements.
Security note: Make sure that the database connection uses credentials that are narrowly-scoped to only include nec
Used to correct relationship direction in generated Cypher statements. This code is copied from the winner's submission to the Cypher competition: https://github.com/sakusaku-rich/cypher-direction-com
BaseStore implementation using Upstash Redis as the underlying store to store strings.
Deprecated in favor of the more generic UpstashRedisByteStore.
Amazon Bedrock Knowledge Bases retriever.
See https://aws.amazon.com/bedrock/knowledge-bases for more info.
Google Vertex AI Search retriever.
For a detailed explanation of the Vertex AI Search concepts and configuration parameters, refer to the product documentation. https://cloud.google.com/generative-
Google Vertex AI Search retriever for multi-turn conversations.
Weaviate hybrid search retriever.
Amazon Kendra Index retriever.
Cohere Chat API with RAG.
A retriever based on Document AI Warehouse.
Documents should be created and documents should be uploaded in a separate flow, and this retriever uses only Document AI schema_id provided to sea
SingleStore DB vector store.
The prerequisite for using this class is the installation of the singlestoredb
Python package.
The SingleStoreDB vectorstore can be created by providing an embeddi
Approximate retrieval strategy using the HNSW algorithm.
Exact retrieval strategy using the script_score query.
Sparse retrieval strategy using the text_expansion processor.
Elasticsearch vector store.
ChromaDB vector store.
To use, you should have the chromadb python package installed.
Couchbase Vector Store vector store.
To use it, you need
couchbase libraryMilvus vector store. DO NOT USE. KEPT FOR BACKWARDS COMPATIBILITY.
You need to install pymilvus and run Milvus.
See the following documentation for how to run a Milvus instance: https://milvus.i
Postgres/PGVector vector store.
DEPRECATED: This class is pending deprecation and will likely receive no updates. An improved version of this class is available in `langchain_postgres
Google Cloud BigQuery vector store.
To use, you need the following packages installed: google-cloud-bigquery
ElasticVectorSearch uses the brute force method of searching on vectors.
Recommended to use ElasticsearchStore instead, which gives you the option to uses the approx HNSW algorithm which performs be
[DEPRECATED] Elasticsearch with k-nearest neighbor search
(k-NN) vector store.
Recommended to use ElasticsearchStore instead, which supports metadata filtering, customising the query retriever an
Azure Cosmos DB for NoSQL vector store.
To use, you should have both:
- the azure-cosmos python package installed
You can read more about vector search, full text search and hybrid search
Redis vector database.
Node in the GraphVectorStore.
Edges exist from nodes with an outgoing link to nodes with a matching incoming link.
For instance two nodes a and b connected over a hyperlink https://some-url
A hybrid vector-and-graph graph store.
Document chunks support vector-similarity search as well as edges linking chunks based on structural and semantic properties.
.. versionadded:: 0.3.1
Retriever for GraphVectorStore.
A graph vector store retriever is a retriever that uses a graph vector store to retrieve documents. It is similar to a vector store retriever, except that it uses both
Base class for Cohere models.
Cohere large language models.
To use, you should have the cohere python package installed, and the
environment variable COHERE_API_KEY set with your API key, or pass
it as a named parameter t
Bedrock models.
To authenticate, the AWS client uses the following methods to automatically load credentials: https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html
If a spec
Anthropic large language models.
To use, you should have the anthropic python package installed, and the
environment variable ANTHROPIC_API_KEY set with your API key, or pass
it as a named pa
Ollama locally runs large language models. To use, follow the instructions at https://ollama.ai/. Example: .. code-block:: python from langchain_community.llms import Ollama ollama
Google Vertex AI large language models.
Vertex AI Model Garden large language models.
HuggingFaceHub models. ! This class is deprecated, you should use HuggingFaceEndpoint instead.
To use, you should have the huggingface_hub python package installed, and the
environment variable
Sagemaker Inference Endpoint models.
To use, you must supply the endpoint name from your deployed Sagemaker model & the region where it is deployed.
To authenticate, the AWS client uses the followin
Prediction Guard large language models.
To use, you should have the predictionguard python package installed, and the
environment variable PREDICTIONGUARD_API_KEY set with your API key, or pa
OpenAI large language models.
To use, you should have the openai python package installed, and the
environment variable OPENAI_API_KEY set with your API key.
Any parameters that are valid to
Azure-specific OpenAI large language models.
To use, you should have the openai python package installed, and the
environment variable OPENAI_API_KEY set with your API key.
Any parameters th
OpenAI Chat large language models.
To use, you should have the openai python package installed, and the
environment variable OPENAI_API_KEY set with your API key.
Any parameters that are val
DEPRECATED: Use langchain_google_genai.GoogleGenerativeAI instead.
Google PaLM models.
LLM models from Together.
To use, you'll need an API key which you can find here:
https://api.together.xyz/settings/api-keys. This can be passed in as init param
together_api_key or set as envi
Fireworks models.
IBM watsonx.ai large language models.
To use, you should have ibm_watsonx_ai python package installed,
and the environment variable WATSONX_APIKEY set with your API key, or pass
it as a named
HuggingFace Endpoint.
To use this class, you should have installed the huggingface_hub package, and
the environment variable HUGGINGFACEHUB_API_TOKEN set with your API token,
or given as a na
HuggingFace text generation API. ! This class is deprecated, you should use HuggingFaceEndpoint instead !
To use, you should have the text-generation python package installed and
a text-generation
HuggingFace Pipeline API.
To use, you should have the transformers python package installed.
Only supports text-generation, text2text-generation, summarization and
translation for now.
Databricks serving endpoint or a cluster driver proxy app for LLM.
It supports two endpoint types:
Neptune wrapper for RDF graph operations.
Neo4j database wrapper for various graph operations.
Parameters: url (Optional[str]): The URL of the Neo4j database server. username (Optional[str]): The username for database authentication. passwor
Neptune Analytics wrapper for graph operations.
Neptune wrapper for graph operations.
Translate Neo4j internal query language elements to valid filters.
DEPRECATED: This class is deprecated and will no longer be maintained. Please use query_constructors.HanaTranslator from the langchain_hana package instead. It offers an improved implementation an
ERNIE-Bot large language model.
ERNIE-Bot is a large language model developed by Baidu, covering a huge amount of Chinese data.
To use, you should have the ernie_client_id and `ernie_client_secr
OpenAI Chat large language models API.
To use, you should have the openai python package installed, and the
environment variable OPENAI_API_KEY set with your API key.
Any parameters that a
Translate text documents using Google Cloud Translation.
Parse a dictionary by creating a component and then turning it back into a dictionary.
This helps with two things
Extract elements from a dictionary.
Parse a JSON string and return the parsed object.
If parsing fails, returns an error message.
:param query: The JSON string to parse. :return: A tuple containing the parsed object or None and an err
Fetch the first id from a dictionary.
Fetch data from a URL.
Fetch the team id.
Fetch the space id.
Fetch the folder id.
Fetch the list id.
Sanitize input string or dict of strings by replacing sensitive data with placeholders.
It returns the sanitized input string or dict of strings and the secure context as a dict following the format:
Restore the original sensitive data from the sanitized text.
Truncate a string to a certain number of words, based on the max string length.
Sanitize a schema name to only contain letters, digits, and underscores.
Get the number of tokens in a string of text.
Get the token ids for a string of text.
Wrap a Cassandra response future in an asyncio future.
Execute a CQL query asynchronously.
Create a retry decorator for Vertex / Palm LLMs.
Raise ImportError related to Vertex SDK being not available.
Init Vertex AI.
Return a custom user agent header.
Load an image from Google Cloud Storage.
Check if the correct Redis modules are installed.
Get a redis client from the connection url given. This helper accepts urls for Redis server (TCP with/without TLS or UnixSocket) as well as Redis Sentinel connections.
Redis Cluster is not supported.
Return an absolute local path for a local file/directory, for a network related path, return as is.
Return loader type among, file, dir or in-memory.
Return an absolute source path of source of loader based on the keys present in Document.
Fetch the current Framework and Runtime details.
Fetch local runtime ip address.
Generate batches of documents based on page_content size. Args: docs: List of documents to be batched. max_batch_size: Maximum size of each batch in bytes. Defaults to 100*1024(100KB) Returns:
Fetch owner of local file path.
Fetch size of source path. Source can be a directory or a file.
Calculate the content size in bytes:
Check if a HTTP response is retryable.
Convert a JSON object to a markdown table.
Add single quotes around table names that contain spaces.
Use tenacity to retry the embedding call.
Use tenacity to retry the embedding call.
Load the embedding model.
Check if an endpoint is live by sending a GET request to the specified URL.
Use tenacity to retry the completion call.
Create a retry decorator for PremAIEmbeddings.
Using tenacity for retry in embedding calls
Use tenacity to retry the embedding call.
Use tenacity to retry the embedding call.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the embedding call.
Use tenacity to retry the embedding call.
Check if a URL is a local file.
Get the bytes string of a file.
Convert the yaml or json serialized spec to a dict.
Authenticate using the AIN Blockchain
Clean body of a message or event.
Authenticate using the Microsoft Graph API
Call f on each item in seq, calling inter() in between.
Parse a file and pretty-print it to output.
The output is formatted as valid Python source code.
Add print statement to the last line if it's missing.
Sometimes, the LLM-generated code doesn't have print(variable_name), instead the
LLM tries to print the variable only by writing `variable_
Deprecated. Use DuckDuckGoSearchRun instead.
Detect if the file is local or remote.
Download audio from url to local.
Check if path is relative to root.
Resolve a relative path, raising an error if not within the root directory.
Upload a block to a signed URL and return the public URL.
Strip markdown code from a string.
Get the first n lines of a file.
Convert a file to base64.
Authenticate using the Amadeus API
Import google libraries.
Import InstalledAppFlow class.
Import googleapiclient.discovery.build function.
Get credentials.
Build a Gmail service.
Clean email body.
Authenticate using the Slack API.
Asynchronously get the current page of the browser.
Get the current page of the browser. Args: browser: The browser to get the current page from.
Create an async playwright browser.
Create a playwright browser.
Run an async coroutine.
Lazy import playwright browsers.
Tool for asking the user for input.
Detect if the file is local or remote.
Download audio from url to local.
Execute a function with the given arguments and return the result.
Row-wise cosine similarity between two equal-width matrices.
Row-wise cosine similarity with optional top-k and score threshold filtering.
Convert a Pydantic model to a function description for the Ernie API.
Convert a Pydantic model to a function description for the Ernie API.
Return a custom user agent header.
Return whether OpenAI API is v1 or more.
Get user agent from environment variable.
Fetch the mime types for the specified file types.
Fetch the mime types for the specified file types.
Try to detect the file encoding.
Returns a list of FileEncoding tuples with the detected encodings ordered
by confidence.
Combine message information in a readable format ready to be used. Args: message: Message to be concatenated title: Title of the conversation
Default joiner for content columns.
Combine cells information in a readable format ready to be used.
Recursively remove newlines, no matter the data structure they are stored in.
Combine message information in a readable format ready to be used.
Convert a string or list of strings to a list of Documents with metadata.
Combine message information in a readable format ready to be used.
Combine message information in a readable format ready to be used.
Check if the installed Unstructured version exceeds the minimum version
for the feature in question.
Raise an error if the Unstructured version does not exceed the
specified minimum.
Retrieve a list of elements from the Unstructured API.
Get a parser by parser name.
Extract text from images with RapidOCR.
Async version of enumerate function.
Convert a dictionary to a LangChain message.
Convert a LangChain message to a dictionary.
Convert dictionaries representing OpenAI messages to LangChain format.
Convert messages to a list of lists of dictionaries for fine-tuning.
Condense Zep memory into a human message.
Get the Zep role type from the role string.
Create a message model for a given table name.
Create topic if it doesn't exist, and return the number of partitions. If the topic already exists, we don't change the topic configuration.
Fetch the current Framework and Runtime details.
Fetch local runtime ip address.
Clear the identity and semantic enforcement filters in the retriever search_kwargs.
Set identity and semantic enforcement filters in the retriever.
Convert a Python function to an Ernie function-calling API compatible dict.
Assumes the Python function has type hints and a docstring with a description. If the docstring has Google Python style
Convert a raw function/class to an Ernie function.
Get the appropriate function output parser given the user functions.
Create a runnable sequence that uses Ernie functions.
Create a runnable that uses an Ernie function to get a structured output.
[Legacy] Create an LLM chain that uses Ernie functions.
[Legacy] Create an LLMChain that uses an Ernie function to get a structured output.
Extract Gremlin code from a text.
Extract Cypher code from a text. Args: text: Text to extract Cypher code from.
Extract Cypher code from a text.
Remove a prefix from a text.
Extract Cypher code from a text.
Create an index of embeddings for a list of contexts.
Create an index of embeddings for a list of contexts.
Create an index of embeddings for a list of contexts.
Deprecated ZillizRetreiver.
Please use ZillizRetriever ('i' before 'e') instead.
Clean an excerpt from Kendra.
Combine a ResultItem title and excerpt into a single string.
Deprecated MilvusRetreiver. Please use MilvusRetriever ('i' before 'e') instead.
Hash a text using SHA256.
Create an index from a list of contexts.
It modifies the index argument in-place!
Check if a string contains multiple substrings. Args: s: string to check. *args: substrings to check.
Import annoy if available, otherwise raise error.
Calculate maximal marginal relevance.
Filter out metadata types that are not supported for a vector store.
Import lancedb package.
Converts a dict filter to a LanceDB filter string.
Import tiledb-vector-search if available, otherwise raise error.
Get the URI of the vector index.
Get the URI of the documents array from group.
Get the URI of the vector index.
Get the URI of the documents array.
Check if a string contains multiple substrings. Args: s: string to check. *args: substrings to check.
Import faiss if available, otherwise raise error. If FAISS_NO_AVX2 environment variable is set, it will be considered to load FAISS with no AVX2 optimization.
Create metadata from fields.
Serializes a list of floats into a compact "raw bytes" format
Source: https://github.com/asg017/sqlite-vec/blob/21c5a14fc71c83f135f5b00c84115139fd12c492/examples/simple-python/demo.py#L8-L10
Convert a dictionary to a YAML-like string without using external libraries.
Parameters:
Returns:
Construct a metadata filter by directly injecting the filter values into the query.
Processes a nested list of entity data to extract information about labels, entity types, properties, index types, and index details (if applicable).
Get the embedding store class.
Translate LangChain filter to Tencent VectorDB filter.
Import usearch if available, otherwise raise error.
Normalize vectors to unit length.
Import scann if available, otherwise raise error.
Check if a string has multiple substrings. Args: s: The string to check *args: The substrings to check for in the string
Print a debug message if DEBUG is True. Args: s: The message to print
Get a named result from a query. Args: connection: The connection to the database query: The query to execute
Read in the index schema from a dict or yaml file.
Check if it is a dict and return RedisModel otherwise, check if it's a path and read in the file assuming it's a yaml file and return a RedisModel
Decorator to check for misuse of equality operators.
Check if Redis index exists.
Return the networkx directed graph corresponding to the documents.
Render a collection of GraphVectorStore documents to GraphViz format.
Get the links from a document.
Add links to the given metadata.
Return a document with the given links added.
Compute ngram overlap score of source and example as sentence_bleu score
from NLTK package.
Use sentence_bleu with method1 smoothing function and auto reweighting.
Return float value between 0
Import flytekit and flytekitplugins-deck-standard.
Analyze text using textstat and spacy.
Import the spacy python package and raise an error if it is not installed.
Import the pandas python package and raise an error if it is not installed.
Import the textstat python package and raise an error if it is not installed.
Flatten a nested dictionary into a flat dictionary.
Hash a string using sha1.
Load json file to a string.
Builds an LLMonitor UserContextManager
Get the OpenAI callback handler in a context manager. which conveniently exposes token and cost information.
Get the Bedrock anthropic callback handler in a context manager. which conveniently exposes token and cost information.
Get the WandbTracer in a context manager.
Get default Label Studio configs for the given mode.
Import the getcontext package.
Import the infino client.
Import tiktoken for counting tokens for OpenAI models.
Calculate num tokens for OpenAI with tiktoken package.
Import the uptrain package.
Import the fiddler python package and raise an error if it is not installed.
Import the clearml python package and raise an error if it is not installed.
Standardize the model name to a format that can be used in the OpenAI API.
Get the cost in USD for a given model and number of tokens.
Import the langkit python package and raise an error if it is not installed.
Import the mlflow python package and raise an error if it is not installed.
Get the metrics to log to MLFlow.
Get the text complexity metrics from textstat.
Analyze text using textstat and spacy.
Construct an html element from a prompt and a generation.
Save dict to local file path.
Import the wandb python package and raise an error if it is not installed.
Load json file to a dictionary.
Analyze text using textstat and spacy.
Construct an html element from a prompt and a generation.
Import the aim python package and raise an error if it is not installed.
Import comet_ml and raise an error if it is not installed.
Utility to flatten a nest run object into a list of runs. :param run: The base run to flatten. :return: The flattened list of runs.
Utility to truncate a list of runs dictionaries to only keep the specified keys in each run. :param runs: The list of runs to truncate. :param keep_keys: The keys to keep in each run. :return: The
Utility to modify the serialized field of a list of runs dictionaries. removes any keys that match the exact_keys and any keys that contain any of the partial_keys. recursively moves the dictionaries
Builds a nested dictionary from a list of runs. :param runs: The list of runs to build the tree from. :return: The nested dictionary representing the langchain Run in a tree structure compatible w
Import comet_llm api and raise an error if it is not installed.
Callback Handler that writes to a Streamlit app.
This CallbackHandler is geared towards use with a LangChain Agent; it displays the Agent's LLM and tool-usage "thoughts" inside a series of Streamlit
Generate text from the model.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Default guardrail violation handler.
Cut off the text as soon as any stop words occur.
Return True if the model name is a Codey model.
Return True if the model name is a Gemini model.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
List available models
Get completions from Aviary models.
Remove trailing slash and /api from url if present.
Update token usage.
Create the LLMResult from the choices and prompts.
Update token usage.
Use tenacity to retry the completion call.
Use tenacity to retry the async completion call.
Load LLM from Config Dict.
Load LLM from a file.
Use tenacity to retry the completion call.
Conditionally apply a decorator.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call for streaming.
Check the response from the completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the completion call.
Async version of stream_generate_with_retry.
Because the dashscope SDK doesn't provide an async API,
we wrap stream_generate_with_retry with an async generator.
Generate elements from an iterable, and a boolean indicating if it is the last element.
Generate elements from an async iterable, and a boolean indicating if it is the last element.
Use tenacity to retry the completion call.
Use tenacity to retry the async completion call.
Get the notebook REPL context if running inside a Databricks notebook. Returns None otherwise.
Get the default Databricks workspace hostname. Raises an error if the hostname cannot be automatically determined.
Get the default Databricks personal access token. Raises an error if the token cannot be automatically determined.
Loads a tool from the HuggingFace Hub.
Load tools based on their name.
Tools allow agents to interact with various resources and services like APIs, databases, file systems, etc.
Please scope the permissions of each tools to the minimum
Get a list of all possible tool names.
Construct a Power BI agent from a Chat LLM and tools.
If you supply only a toolkit and no Power BI dataset, the same LLM is used for both.
Construct a Power BI agent from an LLM and tools.
Construct a Spark SQL agent from an LLM and tools.
This agent can execute arbitrary SQL against your Spark environment.
By default, the agent is allowed to generate SQL strings a
Construct a json agent from an LLM and tools.
Simplify/distill/minify a spec somehow.
I want a smaller target for retrieval and (more importantly) I want smaller results from retrieval. I was hoping https://openapi.tools/ would have some useful
Construct an OpenAI API planner and controller for a given spec.
Inject credentials via requests_wrapper.
We use a top-level "orchestrator" agent to invoke the planner and controller, rather than a
Construct an OpenAPI agent from an LLM and tools.
Security Note: When creating an OpenAPI agent, check the permissions and capabilities of the underlying toolkit.
For example, if the defau
Construct a SQL agent from an LLM and toolkit or database.
This agent can execute arbitrary SQL against your database.
By default, the agent is allowed to generate SQL strings an
Get the Arango DB client from credentials.
Parse knowledge triples from the knowledge string.
Extract entities from entity string.
Merge chat runs together in a chat session.
A chat run is a sequence of messages from the same sender.
Merge chat runs together.
A chat run is a sequence of messages from the same sender.
Convert messages from the specified 'sender' to AI messages.
This is useful for fine-tuning the AI to adapt to your voice.
Convert messages from the specified 'sender' to AI messages.
This is useful for fine-tuning the AI to adapt to your voice.
Convert nanoseconds since 2001 to a datetime object.
Convert a value to a string and add single quotes if it is a string.
Convert a value to a string and add double quotes if it is a string.
It required for comparators involving strings.
Check if a string can be cast to a float.
Context manager for connecting to an SSE stream.
Async context manager for connecting to an SSE stream.
Convert a dict to a message.
Convert a list of messages to a prompt for llama.
Process a single content item.
Process content to handle both text and media inputs, returning a list of content items.
Convert LangChain messages to Reka message format.
Use tenacity to retry the async completion call.
Convert a message to a dictionary that can be passed to the API.
Use tenacity to retry the async completion call.
Context manager for connecting to an SSE stream.
Async context manager for connecting to an SSE stream.
Create a retry decorator for PremAI API errors.
Using tenacity for retry in completion call
Use tenacity to retry the async completion call.
Return the body for the model router input.
Use tenacity to retry the completion call.
Use tenacity to retry the async completion call.
Use tenacity to retry the completion call.
Use tenacity to retry the async completion call.
Get role of the message.
Get a request of the Friendli chat API.
Convert a dict to a message.
Convert a message chunk to a message.
Convert a message to a dict.
Async context manager for connecting to an SSE stream.
Use tenacity to retry the completion call.
Use tenacity to retry the async completion call.
Get all navigable strings from a BeautifulSoup element.
Convert a list of documents to a list of documents with state.
Create a DocumentTransformer that uses an OpenAI function chain to automatically tag documents with metadata based on their content and an input schema.
Args: metadata_schema: Eit
Extract Cypher code from a text.
Filter the schema based on included or excluded types
Convert nodes to documents.
Clean string values for schema.
Cleans the input text by replacing newline and carriage return characters.
Sanitize the input dictionary or list.
Sanitizes the input by removing embedding-like values, lists with more than 128 elements, that are mostly irrelevant for generating answers in a LLM context. Th
Entrypoint into langchain-community.
.. warning:: Beta Feature!
Cache provides an optional caching layer for LLMs.
Cache is useful for two reasons:
OutputParser classes parse the output of an LLM call.
Class hierarchy:
.. code-block::
BaseLLMOutputParser --> BaseOutputParser --> <name>OutputParser # GuardrailsOutputParser
**Main
Utilities are the integrations with third-party systems and packages.
Other LangChain classes use Utilities to interact with third-party systems and packages.
Util that calls SceneXplain.
In order to set this up, you need API key for the SceneXplain API. You can obtain a key by following the steps below.
Util that calls clickup.
Util that can interact with Zapier NLA.
Full docs here: https://nla.zapier.com/start/
Note: this wrapper currently only implemented the api_key auth method for testing
and server-side production u
SQLAlchemy wrapper around a database.
Util that calls Google Scholar Search.
Util that calls Wikidata.
Util that calls WolframAlpha.
Chain that calls SerpAPI.
Heavily borrowed from https://github.com/ofirpress/self-ask
Util that calls Jira.
Util that sends messages via Infobip.
Util that calls Google Search using the Serper.dev API.
Util that calls Twilio.
Util that calls Wikipedia.
Util that calls OpenWeatherMap using PyOWM.
Util that calls Google Books.
Util that calls several NASA APIs.
Util that calls Google Lens Search.
Util that calls AlphaVantage for Currency Exchange Rate.
Utilities to init Vertex AI.
Utility functions for parsing an OpenAPI spec.
Util that calls several of financial datasets stock market REST APIs. Docs: https://docs.financialdatasets.ai/
Utils for interacting with the Semantic Scholar API.
A common module for NVIDIA Riva Runnables.
Util that calls GitHub.
Lightweight wrapper around requests library, with async support.
Util that calls Lambda.
Util that calls Dataherald.
Utility that calls OpenAI's Dall-E Image Generator.
Util that calls AskNews api.
Util that calls Tavily Search API.
In order to set this up, follow instructions at: https://docs.tavily.com/docs/tavily-api/introduction
Util that calls Google Finance Search.
Util that calls Arxiv.
Utility for using SearxNG meta search API.
SearxNG is a privacy-friendly free metasearch engine that aggregates results from `multiple search engines <https://docs.searxng.org/admin/engines/configure
DO NOT USE. Kept for backward compatibility for web search retriever.
Util that calls Steam-WebAPI.
Apache Cassandra database wrapper.
Util that calls Merriam-Webster.
Util that calls several of Polygon's stock market REST APIs. Docs: https://polygon.io/docs/stocks/getting-started
Util that calls Google Scholar Search.
Util that calls DuckDuckGo Search.
No setup required. Free. https://pypi.org/project/duckduckgo-search/
Util that calls Metaphor Search API.
In order to set this up, follow instructions at:
Util that calls Outline.
Util that calls gitlab.
Wrapper for the Reddit API
Util that calls Golden.
Wrapper for Rememberizer APIs.
Util that calls bibtexparser.
Util that calls Google Scholar Search.
Util that calls you.com Search API.
In order to set this up, follow instructions at: https://documentation.you.com/quickstart
Util that calls Bing Search.
Util that invokes the Passio Nutrition AI API.
Wrapper around a Power BI endpoint.
Embedding models are wrappers around embedding models from different APIs and services.
Embedding models can be LLMs or not.
Class hierarchy:
.. code-block::
Embeddings --> <name>
Wrapper around model2vec embedding models.
This file is for LLMRails Embedding
TextEmbed: Embedding Inference Server
TextEmbed provides a high-throughput, low-latency solution for serving embeddings. It supports various sentence-transformer models. Now, it includes the ability
Wrapper around Bookend AI embedding models.
Azure OpenAI embeddings wrapper.
Anyscale embeddings wrapper.
HuggingFace sentence_transformer embedding models.
written under MIT Licence, Michael Feil 2023.
Wrapper around YandexGPT embedding models.
written under MIT Licence, Michael Feil 2023.
Wrapper around Xinference embedding models.
Wrapper around text2vec embedding models.
Docstores are classes to store and load Documents.
The Docstore is a simplified version of the Document Loader.
Class hierarchy:
.. code-block::
Docstore --> <name> # Examples: InM
Wrapper around wikipedia API.
Simple in memory docstore in the form of a dict.
Interface to access to place that stores documents.
Tools are classes that an Agent uses to interact with the world.
Each tool has a description. Agent uses the description to choose the right tool for the job.
Class hierarchy:
.. code-b
Tool for the Google Books API.
From https://github.com/SidU/teams-langchain-js/wiki/Connecting-IFTTT-Services.
Creating a webhook
Configuring the "If This"
Tool for asking for human input.
Tool for asking human input.
Tool implementations for the Riza (https://riza.io) code interpreter API.
Documentation: https://docs.riza.io API keys: https://dashboard.riza.io
GitHub Tool
This tool allows agents to interact with the pygithub library and operate on a GitHub repository.
To use this tool, you must first set as environment variables: GITHUB_API_TOKEN GITHUB_REPOSI
Jira Tool.
This tool allows agents to interact with the atlassian-python-api library and operate on a Jira instance. For more information on the atlassian-python-api library, see https://atlassian-python-api.rea
Shell tool.
Tools for interacting with a SQL database.
Tools for interacting with a SQL database.
Tool for the Arxiv API.
Tools for interacting with a PowerBI dataset.
Tools for interacting with a Power BI dataset.
AskNews API toolkit.
Tool for the AskNews API.
To use this tool, you must first set your credentials as environment variables: ASKNEWS_CLIENT_ID ASKNEWS_CLIENT_SECRET
Bing Search API toolkit.
Tool for the Bing search API.
Google Cloud Tools.
Google Finance API Toolkit.
Tool for the Google Finance
MutliOn Client API tools.
Google Trends API Toolkit.
Tool for the Google Trends
Jina AI toolkit
Tool for the SemanticScholar API.
This tool allows agents to interact with the clickup library and operate on a Clickup instance. To use this tool, you must first set as environment variables: client_secret client_id code
Edenai Tools.
Sleep tool.
Tool for agent to sleep.
Passio Nutrition AI API toolkit.
Tool for the Passio Nutrition AI API.
Tools for interacting with Spark SQL.
Tools for interacting with Spark SQL.
AINetwork Blockchain tool utils.
O365 tools.
O365 tool utils.
Util that sends calendar events in Office 365.
Free, but setup is required. See link below. https://learn.microsoft.com/en-us/graph/auth/
Util that Searches email messages in Office 365.
Free, but setup is required. See link below. https://learn.microsoft.com/en-us/graph/auth/
Util that Searches calendar events in Office 365.
Free, but setup is required. See link below. https://learn.microsoft.com/en-us/graph/auth/
Base class for Office 365 tools.
Usage: unparse.py
Tools for interacting with a JSON file.
Tools for working with JSON specs.
OpenWeatherMap API toolkit.
Tool for the OpenWeatherMap API.
DuckDuckGo Search API toolkit.
Tool for the DuckDuckGo search API.
Tools for making requests to an API endpoint.
Tools for making requests to an API endpoint.
Eleven Labs Services Tools.
Azure AI Services Tools.
You.com API toolkit.
Google Lens API Toolkit.
Tool for the Google Lens
Google Jobs API Toolkit.
Tool for the Google Trends
Tool for the SearchApi.io search API.
PubMed API toolkit.
Tools for interacting with a GraphQL API
Polygon IO tools.
Tavily Search API toolkit.
Tool for the Tavily search API.
File Management Tools.
Metaphor Search API toolkit.
Tool for the Metaphor search API.
This tool allows agents to interact with the NASA API, specifically the the NASA Image & Video Library and Exoplanet
Unsupervised learning based memorization.
Dataherald API toolkit.
Tool for the Dataherald Hosted API
Tool for the DataForSeo SERP API.
Simple tool wrapper around VectorDBQA chain.
Tools for interacting with vectorstores.
Google Scholar API Toolkit.
Tool for the Google Scholar
Steam API toolkit
Tool for Steam Web API
This module contains the ConneryAction Tool and ConneryService.
Tool to generate an image.
Steamship Utils.
This tool allows agents to generate images using Steamship.
Steamship offers access to different third party image generation APIs using a single API key.
Today the following models are supported:
Wikipedia API toolkit.
Tool for the Wikipedia API.
Tool to generate an image using DALLE OpenAI V1 SDK.
Tool for the OpenAI DALLE V1 Image Generation SDK.
SceneXplain API toolkit.
Tool for the SceneXplain API.
Tool for the SearxNG search API.
GitLab Tool
This tool allows agents to interact with the python-gitlab library and operate on a GitLab repository.
To use this tool, you must first set as environment variables: GITLAB_PRIVATE_ACCESS_TOKEN
Zapier Tool.
[DEPRECATED]
Zapier Natural Language Actions API
Full docs here: https://nla.zapier.com/start/
Zapier Natural Language Actions gives you access to the 5k+ apps, 20k+ actions on Zapier's platf
Amadeus tools.
O365 tool utils.
Base class for Amadeus tools.
Merriam-Webster API toolkit.
Tool for the Merriam-Webster API.
Wolfram Alpha API toolkit.
Tool for the Wolfram Alpha API.
Tool for the Serper.dev Google Search API.
Gmail tools.
Send Gmail messages.
Gmail tool utils.
Base class for Gmail tools.
Slack tools.
Slack tool utils.
Base class for Slack tools.
Browser tools and toolkit.
Utilities for the Playwright browser tools.
Golden API toolkit.
Tool for the Golden API.
Tools for interacting with the user.
Tools for interacting with the user.
financial datasets tools.
StackExchange API toolkit.
Tool for the Wikipedia API.
Azure Cognitive Services Tools.
Tool for the Nuclia Understanding API.
Installation:
pip install --upgrade protobuf
pip install nucliadb-protosCassandra Tool
Tools for interacting with an Apache Cassandra database.
Tools for interacting with an Apache Cassandra database.
Cogniswitch Tools
Adapted from https://github.com/venuv/langchain_yt_tools
CustomYTSearchTool searches YouTube videos related to a person and returns a specified number of video URLs. Input to this tool should be a co
Wikidata API toolkit.
Tool for the Wikidata API.
Utility functions for parsing an OpenAPI spec. Kept for backwards compat.
Pydantic models for parsing an OpenAPI spec.
Cross encoders are wrappers around cross encoder models from different APIs and services.
Cross encoder models can be LLMs or not.
Class hierarchy:
.. code-block::
BaseCrossEnc
langchain-community utilities.
Math utils.
Utilities to use Google provided components.
Document Loaders are classes to load Documents.
Document Loaders are usually used to load a lot of Documents in a single run.
Class hierarchy:
.. code-block::
BaseLoader --> <name
Loader that uses unstructured to load HTML files.
Loader that uses Playwright to load a page, then uses unstructured to parse html.
Loads RST files.
Base class for all loaders that uses O365 Package
Loads rich text files.
Web base loader class.
Document loader for EverNote ENEX export files.
This module provides functionality to securely load and parse EverNote notebook
export files (.enex format) into LangChain Document objects.
Loader that uses unstructured to load HTML files.
Document loader helpers.
Loads word documents.
Loads Microsoft Excel files.
Document Loader for ArcGIS FeatureLayers.
Loads .ipynb notebook files.
Loader that uses Selenium to load a page, then uses unstructured to load the html.
Scrapfly Web Reader.
Pebblo's safe dataloader is a wrapper for document loaders
Load Documents from Docusarus Documentation
Loads data from OneNote Notebooks
ScrapingAnt Web Extractor.
Loads YouTube transcript.
Loads Microsoft Excel files.
Loader that loads data from Sharepoint Document Library
Simple reader that reads weather data from OpenWeatherMap API
Loader that uses unstructured to load files.
Use to load blobs from the local file system.
Use to load blobs from the local file system.
Module for parsing text files..
Module contains a PDF parser based on Document AI from Google Cloud.
You need to install two libraries to use this parser: pip install google-cloud-documentai pip install google-cloud-documentai-tool
Module includes a registry of default parser configurations.
Module contains common parsers for PDFs.
Code for generic / auxiliary parsers.
This module contains some logic to help assemble more sophisticated parsers.
Loader that uses bs4 to load HTML files, enriching metadata with page title.
Adapters are used to adapt LangChain models to other APIs.
LangChain integrates with many model providers.
While LangChain has its own message and model APIs, LangChain has also made it as easy as p
Chat message history stores a history of the message interactions in a chat.
Class hierarchy:
.. code-block::
BaseChatMessageHistory --> <name>ChatMessageHistory # Examples: FileChatMe
Firestore Chat Message History.
Azure CosmosDB Memory History.
Cassandra-based chat message history, based on cassIO.
Kafka-based chat message history by using confluent-kafka-python. confluent-kafka-python is under Apache 2.0 license. https://github.com/confluentinc/confluent-kafka-python
Chains module for langchain_community
This module contains the community chains.
Chain that hits a URL and then uses an LLM to parse results.
Models for the PebbloRetrievalQA chain.
Identity & Semantic Enforcement filters for PebbloRetrievalQA chain:
This module contains methods for applying Identity and Semantic Enforcement filters in the PebbloRetrievalQA chain. These filters
Pebblo Retrieval Chain with Identity & Semantic Enforcement for question-answering against a vector database.
Methods for creating chains that use Ernie function-calling APIs.
Implement a GPT-3 driven browser.
Heavily influenced from https://github.com/nat/natbot
Question answering over a knowledge graph.
Question answering over a graph.
Question answering over a graph.
Question answering over a graph.
Question answering over a graph.
Question answering over a graph.
Question answering over a graph.
Question answering over an RDF or OWL graph using SPARQL.
Question answering over a graph.
Question answering over a graph.
Question answering over a graph.
Question answering over a graph.
request parser.
Chain that makes API calls and summarizes the responses to answer a question.
Response parser.
Storage is an implementation of key-value store.
Storage module provides implementations of various key-value stores that conform to a simple key-value interface.
The primary goal of these stora
Retriever class returns Documents given a text query.
It is more general than a vector store. A retriever does not need to be able to store documents, only to return (or retrieve) it. Vector
KNN Retriever. Largely based on https://github.com/karpathy/randomfun/blob/master/knn_vs_svm.ipynb
Retriever wrapper for Google Vertex AI Search.
Wrapper around Dria Retriever.
Wrapper around Embedchain Retriever.
Milvus Retriever
Wrapper around Elasticsearch vector database.
Taken from: https://docs.pinecone.io/docs/hybrid-search
Retriever wrapper for Google Cloud Document AI Warehouse.
Vector store stores embedded data and performs vector search.
One of the most common ways to store and search over unstructured data is to embed it and store the resulting embedding vectors, and
Module providing Infinispan as a VectorStore
Wrapper around scikit-learn NearestNeighbors implementation.
The vector store can be persisted in json, bson or parquet format.
Wrapper around Vald vector database.
Utility functions for working with vectors and vectorstores.
Wrapper around LLMRails vector database.
Wrapper around TileDB vector database.
Wrapper around Epsilla vector database.
VectorStore wrapper around a Postgres-TimescaleVector database.
Wrapper around the Baidu vector database.
Wrapper around the Tencent vector database.
Pathway Vector Store client.
The Pathway Vector Server is a pipeline written in the Pathway framweork which indexes all files in a given folder, embeds them, and builds a vector index. The pipeline r
Vector Store in Google Cloud BigQuery.
Wrapper around in-memory storage.
Wrapper around Redis vector database.
.. title:: Graph Vector Store
Graph Vector Store
Sometimes embedding models don't capture all the important relationships between documents. Graph Vector Stores are an extension t
Utilities for using Graph Vector Stores with networkx.
Apache Cassandra DB graph vector store integration.
Tools for the Graph Traversal Maximal Marginal Relevance (MMR) reranking.
Example selector implements logic for selecting examples to include them in prompts.
This allows us to select examples that are most relevant to the input.
There could be multiple strategies for
Select and order examples based on ngram overlap score (sentence_bleu score).
https://www.nltk.org/_modules/nltk/translate/bleu_score.html https://aclanthology.org/P02-1040.pdf
Callback handlers allow listening to events in LangChain.
Class hierarchy:
.. code-block::
BaseCallbackHandler --> <name>CallbackHandler # Example: AimCallbackHandler
FlyteKit callback handler.
Callback handler for Context AI
UpTrain Callback Handler
UpTrain is an open-source platform to evaluate and improve LLM applications. It provides grades for 20+ preconfigured checks (covering language, code, embedding use cases), p
ArthurAI's Callback Handler.
Callback Handler that prints to std out.
Ratelimiting Handler to limit requests or tokens
Callback handler for promptlayer.
Tracers that record execution of LangChain runs.
A Tracer Implementation that records activity to Weights & Biases.
Callback Handler that prints to streamlit.
LLM classes provide access to the large language model (LLM) APIs and services.
Class hierarchy:
.. code-block::
BaseLanguageModel --> BaseLLM --> LLM --> <name> # Examples: AI21,
LLM for OCI data science model deployment endpoint.
Common utility functions for LLM APIs.
Wrapper around EdenAI's Generation API.
Wrapper around Konko AI's Completion API.
Sagemaker InvokeEndpoint API.
Wrapper around Minimax APIs.
Wrapper around Anyscale Endpoint
Base interface for loading large language model APIs.
Wrapper around Together AI's Completion API.
RWKV models.
Based on https://github.com/saharNooby/rwkv.cpp/blob/master/rwkv/chat_with_bot.py https://github.com/BlinkDL/ChatRWKV/blob/main/v2/chat.py
Toolkits are sets of tools that can be used to interact with various services and APIs.
Tools provide access to various resources and services.
LangChain has a large ecosystem of integrations with various external resources like local and remote file systems, APIs and databases.
These
Toolkits for agents.
GitHub Toolkit.
GitHub Toolkit.
Jira Toolkit.
Power BI agent.
Toolkit for interacting with a Power BI dataset.
Power BI agent.
Prompts for PowerBI agent.
Power BI agent.
Tool for interacting with a single API with natural language definition.
MultiOn Toolkit.
MultiOn agent.
Spark SQL agent.
Toolkit for interacting with Spark SQL.
Spark SQL agent.
AINetwork toolkit.
Office365 toolkit.
Json agent.
Json agent.
Polygon Toolkit
Local file management toolkit.
NASA Toolkit
Steam Toolkit.
Steam Toolkit.
This module contains the ConneryToolkit.
GitLab Toolkit.
GitLab Toolkit.
Zapier Toolkit.
[DEPRECATED] Zapier Toolkit.
Gmail toolkit.
Slack toolkit.
Playwright browser toolkit.
Playwright web browser toolkit.
financial datasets toolkit.
Apache Cassandra Toolkit.
Apache Cassandra Toolkit.
CogniSwitch Toolkit
OpenAPI spec agent.
Requests toolkit.
Quick and dirty representation for OpenAPI specs.
Agent that interacts with OpenAPI APIs via a hierarchical planning approach.
OpenAPI spec agent.
SQL agent.
Toolkit for interacting with an SQL database.
SQL agent.
Graphs provide a natural language interface to graph databases.
Networkx wrapper for graph operations.
Chat Loaders load chat messages from common communications platforms.
Load chat messages from various communications platforms such as Facebook Messenger, Telegram, and WhatsApp. The loaded chat
Utilities for chat loaders.
Index is used to avoid writing duplicated content into the vectostore and to avoid over-writing content if it's unchanged.
Indexes also :
Create knowledge graphs from data.
Support indexing
Logic for converting internal query language to a valid AstraDB query.
Logic for converting internal query language to a valid MongoDB Atlas query.
Logic for converting internal query language to a valid Milvus query.
Logic for converting internal query language to a valid Chroma query.
Logic for converting internal query language to a valid DashVector query.
Chat Models are a variation on language models.
While Chat Models use language models under the hood, the interface they expose is a bit different. Rather than expose a "text in, text out" API, t
Writer chat wrapper.
ZhipuAI chat models wrapper.
MLX Chat Wrapper.
Wrapper around Moonshot chat models.
PromptLayer wrapper.
JinaChat wrapper.
Fake ChatModel for testing purposes.
KonkoAI chat wrapper.
ChatYuan2 wrapper.
Wrapper around Minimax chat models.
Wrapper around Prem's Chat API.
Anyscale Endpoints chat wrapper. Relies heavily on ChatOpenAI.
DO NOT USE; KEPT FOR BACKWARDS COMPAT.
THIS MAY BE DELETED AT ANY POINT.
deepinfra.com chat models wrapper
Wrapper around Google's PaLM Chat API.
OctoAI Endpoints chat wrapper. Relies heavily on ChatOpenAI.
Chat model for OCI data science model deployment endpoint.
Wrapper around YandexGPT chat models.
Kinetica SQL generation LLM API.
ChatModel wrapper which returns user input as the response..
EverlyAI Endpoints chat wrapper. Relies heavily on ChatOpenAI.
Document Transformers are classes to transform Documents.
Document Transformers usually used to transform a lot of Documents in a single run.
Class hierarchy:
.. code-block::
BaseD
Transform documents
Document transformers that use OpenAI Functions models
Reorder documents