pnpm install @langchain/community
This package, along with the main LangChain package, depends on @langchain/core.
If you are using this package with other LangChain packages, you should make sure that all of the packages depend on the same instance of @langchain/core.
You can do so by adding appropriate field to your project's package.json like this:
{
"name": "your-project",
"version": "0.0.0",
"dependencies": {
"@langchain/community": "^0.0.0",
"@langchain/core": "^0.3.0"
},
"resolutions": {
"@langchain/core": "^0.3.0"
},
"overrides": {
"@langchain/core": "^0.3.0"
},
"pnpm": {
"overrides": {
"@langchain/core": "^0.3.0"
}
}
}
The field you need depends on the package manager you're using, but we recommend adding a field for the common yarn, npm, and pnpm to maximize compatibility.
LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.
As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
For detailed information on how to contribute, see here.
Class representing a toolkit for interacting with AWS Step Functions. It initializes the AWS Step Functions tools and provides them as tools for the agent.
Abstract base class for toolkits in LangChain. Toolkits are collections
of tools that agents can use. Subclasses must implement the tools
property to provide the specific tools for the toolkit.
ConneryToolkit provides access to all the available actions from the Connery Runner.
Abstract base class for toolkits in LangChain. Toolkits are collections
of tools that agents can use. Subclasses must implement the tools
property to provide the specific tools for the toolkit.
Abstract base class for toolkits in LangChain. Toolkits are collections
of tools that agents can use. Subclasses must implement the tools
property to provide the specific tools for the toolkit.
Cache LLM results using Redis.
A cache that uses Momento as the backing store. See https://gomomento.com.
A cache that uses Upstash as the backing store. See https://docs.upstash.com/redis.
A cache that uses Vercel KV as the backing store.
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 rate limit which utilizes Upstash Redis to track the stat
Chain for question-answering against a graph by generating Cypher statements.
Wrapper around Ali Tongyi large language models that use the Chat endpoint.
To use you should have the ALIBABA_API_KEY
environment variable set.
AWS Bedrock chat model integration.
Setup:
Install @langchain/community and set the following environment variables:
npm install @langchain/openai
export AWS_REGION="your-aws-region"
expor
AWS Bedrock chat model integration.
Setup:
Install @langchain/community and set the following environment variables:
npm install @langchain/openai
export AWS_REGION="your-aws-region"
expor
Wrapper around Fireworks API for large language models fine-tuned for chat
Fireworks API is compatible to the OpenAI API with some limitations described in https://readme.fireworks.ai/docs/openai-com
The ChatFriendli class is used to interact with Friendli inference Endpoint models. This requires your Friendli Token and Friendli Team which is autoloaded if not specified.
To use this model you need to have the node-llama-cpp module installed.
This can be installed using npm install -S node-llama-cpp and the minimum
version supported in version 2.0.0.
This also r
Wrapper around Minimax large language models that use the Chat endpoint.
To use you should have the MINIMAX_GROUP_ID and MINIMAX_API_KEY
environment variable set.
Interface defining the input to the MoonshotChatInput class.
Novita chat model implementation
Wrapper around Perplexity large language models that use the Chat endpoint.
Integration with a chat model.
Wrapper around Tencent Hunyuan large language models that use the Chat endpoint.
To use you should have the TENCENT_SECRET_ID and TENCENT_SECRET_KEY
environment variable set.
Wrapper around Tencent Hunyuan large language models that use the Chat endpoint.
To use you should have the TENCENT_SECRET_ID and TENCENT_SECRET_KEY
environment variable set.
TogetherAI chat model integration.
The TogetherAI API is compatible to the OpenAI API with some limitations. View the full API ref at:
To use this model you need to have the @mlc-ai/web-llm module installed.
This can be installed using npm install -S @mlc-ai/web-llm.
You can see a list of available model records here: https://gi
Interface defining the input to the ZhipuAIChatInput class.
A class that extends the TextLoader class. It represents a document
loader that loads documents from a CSV file. It has a constructor that
takes a filePathOrBlob parameter representing the path to t
A class that extends the BufferLoader class. It represents a document
loader that loads documents from DOCX files.
It has a constructor that takes a filePathOrBlob parameter representing the path
A class that extends the BaseDocumentLoader class. It represents a
document loader that loads documents from EPUB files.
A class that extends the DirectoryLoader class. It represents a document loader that loads documents from a directory in the Notion format. It uses the TextLoader for loading '.md' files and ignores u
Represents a loader for directories containing Obsidian markdown files. This loader extends the DirectoryLoader and provides functionality to load and parse '.md' files with YAML frontmatter, Obsidian
A class that extends the BufferLoader class. It represents a document
loader that loads documents from PDF files.
A class that extends the BufferLoader class. It represents a document
loader that loads documents from PPTX files.
A class that extends the TextLoader class. It represents a document
loader that loads documents from SRT (SubRip) subtitle files. It has a
constructor that takes a filePathOrBlob parameter represe
A document loader that loads unstructured documents from a directory using the UnstructuredLoader. It creates a UnstructuredLoader instance for each supported file type and passes it to the DirectoryL
A document loader that uses the Unstructured API to load unstructured documents. It supports both the new syntax with options object and the legacy syntax for backward compatibility. The load() method
A class that extends the BaseDocumentLoader and implements the DocumentLoader interface. It represents a document loader that loads documents from an Apify dataset.
Transcribe audio and load subtitles for the transcript as srt or vtt format.
Transcribe audio and load the transcript as a document using AssemblyAI.
Transcribe audio and load the paragraphs of the transcript, creating a document for each paragraph.
Transcribe audio and load the sentences of the transcript, creating a document for each sentence.
Class representing a document loader that loads documents from an Azure Blob Storage container. It extends the BaseDocumentLoader class.
Class representing a document loader that loads a specific file from Azure Blob Storage. It extends the BaseDocumentLoader class and implements the DocumentLoader interface.
Load pre-rendered web pages using a headless browser hosted on Browserbase.
Depends on @browserbasehq/sdk package.
Get your API key from https://browserbase.com
A class that extends the BaseDocumentLoader and implements the DocumentLoader interface. It represents a document loader for loading web-based documents using Cheerio.
A document loader specifically designed for loading documents from the College Confidential website. It extends the CheerioWebBaseLoader.
Class representing a document loader for loading pages from Confluence.
loader for couchbase document
Class representing a document loader for loading Figma files. It extends the BaseDocumentLoader and implements the FigmaLoaderParams interface. The constructor takes a config object as a parameter, wh
Class representing a document loader for loading data from Firecrawl (firecrawl.dev). It extends the BaseDocumentLoader class.
Class representing a document loader specifically designed for loading documents from Gitbook. It extends the CheerioWebBaseLoader.
A class that extends the BaseDocumentLoader and implements the GithubRepoLoaderParams interface. It represents a document loader for loading files from a GitHub repository.
A class that extends the BaseDocumentLoader class. It represents a document loader for loading files from a google cloud storage bucket.
A class that extends the CheerioWebBaseLoader class. It represents a loader for loading web pages from the Hacker News website.
A class that extends the CheerioWebBaseLoader class. It represents a loader for loading web pages from the IMSDB (Internet Movie Script Database) website.
Class responsible for converting Jira issues to Document objects
Class representing a document loader for loading issues from Jira.
A class that extends the BaseDocumentLoader class. It represents a document loader for loading documents from Notion using the Notion API.
A document loader for loading data from PDFs.
Class representing a document loader for scraping web pages using Playwright. Extends the BaseDocumentLoader class and implements the DocumentLoader interface.
Class that extends the BaseDocumentLoader class and implements the DocumentLoader interface. It represents a document loader for scraping web pages using Puppeteer.
A class that extends the BaseDocumentLoader class. It represents a document loader for loading files from an S3 bucket.
Class representing a document loader for loading search results from the SearchApi. It extends the BaseDocumentLoader class.
Class representing a document loader for loading search results from the SerpAPI. It extends the BaseDocumentLoader class.
Interface representing the parameters for initializing a SitemapLoader. SitemapLoaderParams
A class that represents a document loader for transcribing audio files using the Sonix Speech Recognition service.
Class representing a document loader for loading data from the SortXYZ blockchain using the SortXYZ API.
Class representing a document loader for loading data from Spider (spider.cloud). It extends the BaseDocumentLoader class.
Class representing a document loader for loading Taskade project. It extends the BaseDocumentLoader and implements the TaskadeLoaderParams interface. The constructor takes a config object as a paramet
A document loader for loading data from YouTube videos. It uses the youtubei.js library to fetch the transcript and video metadata.
A transformer that converts HTML content to plain text.
A transformer that uses the Mozilla Readability library to extract the main content from a web page.
A class for generating embeddings using the DeepInfra API.
A class for generating embeddings using the Fireworks AI API.
Class for generating embeddings using the Gradient AI's API. Extends the Embeddings class and implements GradientEmbeddingsParams and
Class that extends the Embeddings class and provides methods for generating embeddings using Hugging Face models through the HuggingFaceInference API.
Class for generating embeddings using the Minimax API. Extends the Embeddings class and implements MinimaxEmbeddingsParams
Class for generating embeddings using the Prem AI's API. Extends the Embeddings class and implements PremEmbeddingsParams and
Class for generating embeddings using the Tencent Hunyuan API.
Class for generating embeddings using the Tencent Hunyuan API.
Class that extends the Embeddings class and provides methods for generating embeddings using the Universal Sentence Encoder model from TensorFlow.js.
Class for generating embeddings using the TogetherAI API. Extends the Embeddings class and implements TogetherAIEmbeddingsParams.
A class for generating embeddings using the Voyage AI API.
Interface that extends EmbeddingsParams and defines additional parameters specific to the ZhipuAIEmbeddingsParams class.
To use this model you need to have the Built-in AI Early Preview Program
for Chrome. You can find more information about the program here:
Class for generating embeddings for text and images using Google's Vertex AI. It extends the Embeddings base class and implements the GoogleVertexAIMultimodalEmbeddingsParams interface.
Class representing the AI21 language model. It extends the LLM (Large Language Model) class, providing a standard interface for interacting with the AI21 language model.
Specific implementation of a Large Language Model (LLM) designed to interact with the Aleph Alpha API. It extends the base LLM class and includes a variety of parameters for customizing the behavior o
A type of Large Language Model (LLM) that interacts with the Bedrock
service. It extends the base LLM class and implements the
BaseBedrockInput interface. The class is designed to authenticate and
A type of Large Language Model (LLM) that interacts with the Bedrock
service. It extends the base LLM class and implements the
BaseBedrockInput interface. The class is designed to authenticate and
Wrapper around Fireworks API for large language models
Fireworks API is compatible to the OpenAI API with some limitations described in https://readme.fireworks.ai/docs/openai-compatibility.
To use,
The Friendli class is used to interact with Friendli inference Endpoint models. This requires your Friendli Token and Friendli Team which is autoloaded if not specified.
The GradientLLM class is used to interact with Gradient AI inference Endpoint models. This requires your Gradient AI Access Token which is autoloaded if not specified.
Class implementing the Large Language Model (LLM) interface using the Hugging Face Inference API for text generation.
Integration with an LLM.
To use this model you need to have the node-llama-cpp module installed.
This can be installed using npm install -S node-llama-cpp and the minimum
version supported in version 2.0.0.
This also r
The RaycastAI class, which extends the LLM class and implements the RaycastAIInput interface.
Class responsible for managing the interaction with the Replicate API. It handles the API key and model details, makes the actual API calls, and converts the API response into a format usable by the r
A handler class to transform input from LLM to a format that SageMaker endpoint expects. Similarily, the class also handles transforming output from the SageMaker endpoint to a format that LLM class e
The SageMakerEndpoint class is used to interact with SageMaker Inference Endpoint models. It uses the AWS client for authentication, which automatically loads credentials. If a specific credential pro
Class representing a Writer Large Language Model (LLM). It interacts with the Writer API to generate text completions.
Abstract class that provides a base for implementing different types of memory systems. It is designed to maintain the state of an application, specifically the history of a conversation. This class i
Class used to manage the memory of a chat session using the Mem0 service. It handles loading and saving chat history, and provides methods to format the memory content for use in chat models.
Class for managing chat message memory using the Motorhead service. It extends BaseChatMemory and includes methods for initializing the memory, loading memory variables, and saving the context.
Class used to manage the memory of a chat session, including loading and saving the chat history, and clearing the memory when needed. It uses the ZepClient to interact with the Zep service for managi
Class used to manage the memory of a chat session, including loading and saving the chat history, and clearing the memory when needed. It uses the ZepClient to interact with the Zep service for managi
A retriever that searches arXiv for relevant articles based on a query. It can retrieve either full documents (PDFs) or just summaries.
Example usage:
// Initialize embeddings and chat model
const embeddings = new OpenAIEmbeddings();
const chatModel = new ChatOpenAI({ model: "gpt-4o-mini" });
// Create retriever with hybrid sea
A retriever that uses the BM25 algorithm to rank documents based on their similarity to a query. It uses the "okapibm25" package for BM25 scoring. The k parameter determines the number of documents to
Class used to interact with the Metal service, a managed retrieval & memory platform. It allows you to index your data into Metal and run semantic search and retrieval on it. It extends the `BaseRetri
Abstract class for interacting with a remote server to retrieve relevant documents based on a given query.
Class for performing hybrid search operations on a Supabase database.
It extends the BaseRetriever class and implements methods for
similarity search, keyword search, and hybrid search.
A class for retrieving documents related to a given search term using the Tavily Search API.
Class responsible for retrieving data from Vespa. It extends the
RemoteRetriever class and includes methods for creating the JSON body
for a query and processing the JSON response from Vespa.
Class for retrieving information from a Zep long-term memory store. Extends the BaseRetriever class.
Class for retrieving information from a Zep Cloud long-term memory store. Extends the BaseRetriever class.
A concrete implementation of BaseStore for interacting with a Cassandra database. It provides methods to get, set, delete, and yield keys based on specified criteria.
Class that extends the BaseStore class to interact with a Convex database. It provides methods for getting, setting, and deleting key value pairs, as well as yielding keys from the database.
Class that extends the BaseStore class to interact with a Redis database. It provides methods for getting, setting, and deleting data, as well as yielding keys from the database.
Class that extends the BaseStore class to interact with an Upstash Redis database. It provides methods for getting, setting, and deleting data, as well as yielding keys from the database.
Class that extends the BaseStore class to interact with a Vercel KV database. It provides methods for getting, setting, and deleting data, as well as yielding keys from the database.
Abstract class for a document store. All document stores should extend this class.
Class that provides an interface for interacting with Google Cloud Storage (GCS) as a document store. It extends the Docstore class and implements methods to search, add, and add a document to the GCS
Class for storing and retrieving documents in memory asynchronously. Extends the Docstore class.
Class for storing and retrieving documents in memory synchronously.
Class for storing chat message history with Astra DB. It extends the BaseListChatMessageHistory class and provides methods to get, add, and clear messages.
Class for managing chat message history using a Amazon Aurora DSQL Database as a storage backend. Extends the BaseListChatMessageHistory class.
Class for storing chat message history within Cassandra. It extends the BaseListChatMessageHistory class and provides methods to get, add, and clear messages.
Class providing methods to interact with a DynamoDB table to store and
retrieve chat messages. It extends the BaseListChatMessageHistory
class.
Store chat message history using a local JSON file. For demo and development purposes only.
Class for managing chat message history using Google's Firestore as a storage backend. Extends the BaseListChatMessageHistory class.
Class for storing chat message history in-memory. It extends the BaseListChatMessageHistory class and provides methods to get, add, and clear messages.
Class used to store chat message history in Redis. It provides methods to add, retrieve, and clear messages from the chat history.
A class that stores chat message history using Momento Cache. It interacts with a Momento cache client to perform operations like fetching, adding, and deleting messages.
Class for storing and retrieving chat message history from a PlanetScale database. Extends the BaseListChatMessageHistory class.
Class for managing chat message history using a Postgres Database as a storage backend. Extends the BaseListChatMessageHistory class.
Class used to store chat message history in Redis. It provides methods to add, get, and clear messages.
A class for managing chat message history using Xata.io client. It extends the BaseListChatMessageHistory class and provides methods to get, add, and clear messages. It also ensures the existence of a
Class used to manage the memory of a chat session, including loading and saving the chat history, and clearing the memory when needed. It uses the ZepClient to interact with the Zep service for managi
Specialized translator for the Chroma vector database. It extends the BasicTranslator class and translates internal query language elements to valid filters. The class defines a subset of allowed logi
A specialized translator designed to work with Supabase, extending the BaseTranslator class. It translates structured queries into a format that can be understood by the Supabase database.
Class for creating instances of AI tools from plugins. It extends the Tool class and implements the AIPluginToolParams interface.
Class for invoking AWS Lambda functions within the LangChain framework. Extends the DynamicTool class.
Class for checking the status of an AWS Step Function execution.
Class for sending a task success signal to an AWS Step Function execution.
Class for starting the execution of an AWS Step Function.
A tool for web search functionality using Bing's search engine. It
extends the base Tool class and implements the _call method to
perform the search operation. Requires an API key for Bing's searc
Class for interacting with the Brave Search engine. It extends the Tool class and requires an API key to function. The API key can be passed in during instantiation or set as an environment variable n
A LangChain Tool object wrapping a Connery action. ConneryAction is a structured tool that can be used only in the agents supporting structured tools.
A service for working with Connery Actions.
The DadJokeAPI class is a tool for generating dad jokes based on a specific topic. It fetches jokes from an external API and returns a random joke from the results. If no jokes are found for the given
DataForSeoAPISearch
A tool for searching for messages within a discord channel using a bot. It extends the base Tool class and implements the _call method to perform the retrieve operation. Requires an bot token which ca
A tool for retrieving all servers a bot is a member of. It extends the
base Tool class and implements the _call method to perform the retrieve
operation. Requires a bot token which can be set in t
A tool for retrieving messages from a discord channel using a bot. It extends the base Tool class and implements the _call method to perform the retrieve operation. Requires an bot token which can be
A tool for retrieving text channels within a server/guild a bot is a member
of. It extends the base Tool class and implements the _call method to
perform the retrieve operation. Requires a bot tok
A tool for sending messages to a discord channel using a bot. It extends the base Tool class and implements the _call method to perform the retrieve operation. Requires a bot token and channelId which
DuckDuckGo tool integration.
Setup:
Install @langchain/community and duck-duck-scrape.
npm install @langchain/community duck-duck-scrape
[Constructor args](https://api.js.langcha
A tool that can be created dynamically from a function, name, and description, designed to work with structured data. It extends the StructuredTool class and overrides the _call method to execute the
A tool that can be created dynamically from a function, name, and description.
Class that uses the Google Search API to perform custom searches.
Requires environment variables GOOGLE_API_KEY and GOOGLE_CSE_ID to
be set.
Tool that queries the Google Places API
Class for interacting with the Google Routes API It extends the StructuredTool class to perform retrieval.
Tool for querying Google Scholar using the SerpApi service.
Tool that queries the Google Trends API. Uses default interest over time.
Represents a tool for creating and managing webhooks with the IFTTT (If This Then That) service. The IFTTT service allows users to create chains of simple conditional statements, called applets, which
SearchApi Class Definition.
Provides a wrapper around the SearchApi.
Ensure you've set the SEARCHAPI_API_KEY environment variable for authentication. You can obtain a free API key from https://www.s
SearxngSearch class represents a meta search engine tool. Use this class when you need to answer questions about current events. The input should be a search query, and the output is a JSON array of t
Wrapper around SerpAPI.
To use, you should have the serpapi package installed and the SERPAPI_API_KEY environment variable set.
Wrapper around serper.
You can create a free API key at https://serper.dev.
To use, you should have the SERPER_API_KEY environment variable set.
Class for interacting with the StackExchange API It extends the base Tool class to perform retrieval.
Wikipedia query tool integration.
Setup:
Install @langchain/community. You'll also need an API key.
npm install @langchain/community
[Constructor args](https://api.js.langchain.com
Provides a centralized and streamlined factory for creating and configuring instances of the Cassandra client. This class abstracts the complexities involved in instantiating and configuring Cassandra
Represents a Cassandra table, encapsulating functionality for schema definition, data manipulation, and querying. This class provides a high-level abstraction over Cassandra's table operations, includ
Class that provides methods for creating and managing a collection of documents in an AnalyticDB, adding documents or vectors to the collection, performing similarity search on vectors, and creating a
Example usage:
// Initialize the vector store
const vectorStore = new AzionVectorStore(embeddings, {
dbName: "mydb",
tableName: "documents"
});
// Setup database with hybrid search and meta
Azure AI Search vector store. To use this, you should have:
@azure/search-documents NPM package installedIf you directly provide a `Sear
Class for interacting with the Cassandra database. It extends the VectorStore class and provides methods for adding vectors and documents, searching for similar vectors, and creating instances from te
Chroma vector store integration.
Setup:
Install @langchain/community and chromadb.
npm install @langchain/community chromadb
[Constructor args](https://api.js.langchain.com/class
Class for interacting with the ClickHouse database. It extends the VectorStore class and provides methods for adding vectors and documents, searching for similar vectors, and creating instances from t
Class that implements a vector store using Hierarchical Navigable Small World (HNSW) graphs. It extends the SaveableVectorStore class and provides methods for adding documents and vectors, performing
Class that implements a vector store using CloseVector, It extends the SaveableVectorStore class and provides methods for adding documents and vectors, performing similarity searches, and saving and l
Class that is a wrapper around Convex storage and vector search. It is used to insert embeddings in Convex documents with a vector search index, and perform a vector search on them.
ConvexVectorStore
Class for interacting with the Couchbase database using Query service for vector search. It extends the VectorStore class and provides methods for adding vectors and documents, and searching for simil
Class for interacting with the Couchbase database. It extends the VectorStore class and provides methods for adding vectors and documents, and searching for similar vectors. Initiate the class using i
Elasticsearch vector store supporting vector and hybrid search.
Hybrid search combines kNN vector search with BM25 full-text search
using RRF. Enable by passing a HybridRetrievalStrategy to the con
Hybrid search strategy combining vector and BM25 search using RRF.
A class that wraps the FAISS (Facebook AI Similarity Search) vector database for efficient similarity search and clustering of dense vectors.
A Document that optionally includes the ID of the document.
A class that represents a connection to a Google Vertex AI Matching Engine instance.
Class that implements a vector store using Hierarchical Navigable Small World (HNSW) graphs. It extends the SaveableVectorStore class and provides methods for adding documents and vectors, performing
A wrapper for an open-source database for vector-search with persistent storage. It simplifies retrieval, filtering, and management of embeddings.
A vector store using LibSQL/Turso for storage and retrieval.
MariaDB vector store integration.
Setup:
Install @langchain/community and mariadb.
If you wish to generate ids, you should also install the uuid package.
npm install @langchain/commun
Class for interacting with a Milvus database. Extends the VectorStore class.
A vector store that uses the Momento Vector Index.
Class for interacting with the MyScale database. It extends the VectorStore class and provides methods for adding vectors and documents, searching for similar vectors, and creating instances from text
Class that provides an interface to a Neon Postgres database. It
extends the VectorStore base class and implements methods for adding
documents and vectors, performing similarity searches, and ensur
Class that provides a wrapper around the OpenSearch service for vector search. It provides methods for adding documents and vectors to the OpenSearch index, searching for similar vectors, and managing
PGVector vector store integration.
Setup:
Install @langchain/community and pg.
If you wish to generate ids, you should also install the uuid package.
npm install @langchain/community
A specific implementation of the VectorStore class that is designed to work with Prisma. It provides methods for adding models, documents, and vectors, as well as for performing similarity searches.
Exposes Rockset's vector store/search functionality
Error that is thrown when a RocksetStore function is called
after destroy() is called (meaning the collection would be
deleted).
Generic Rockset vector storage error
Class for interacting with SingleStoreDB, a high-performance distributed SQL database. It provides vector storage and vector functions.
Supabase vector store integration.
Setup:
Install @langchain/community and @supabase/supabase-js.
npm install @langchain/community @supabase/supabase-js
See https://js.langchain.com
Class for managing and operating vector search applications with Tigris, an open-source Serverless NoSQL Database and Search Platform.
Class that provides an interface to a Postgres vector database. It
extends the VectorStore base class and implements methods for adding
documents and vectors, performing similarity searches, and ens
Class that extends the Document base class and adds an embedding
property. It represents a document in the vector store.
Typesense vector store.
The main class that extends the 'VectorStore' class. It provides methods for interacting with Upstash index, such as adding documents, deleting documents, performing similarity search and more.
Class that extends SaveableVectorStore and provides methods for
adding documents and vectors to a usearch index, performing
similarity searches, and saving the index.
Class for interacting with the Vectara API. Extends the VectorStore class.
Class that provides an interface to a Vercel Postgres vector database. It
extends the VectorStore base class and implements methods for adding
documents and vectors and performing similarity searche
Class that extends VectorStore. It allows to perform similarity search using
Voi similarity search engine. The class requires passing Voy Client as an input parameter.
Class for interacting with a Xata database as a VectorStore. Provides methods to add documents and vectors to the database, delete entries, and perform similarity searches.
ZepVectorStore is a VectorStore implementation that uses the Zep long-term memory store as a backend.
If the collection does not exist, it will be created automatically.
Requires zep-js to be inst
ZepCloudVectorStore is a VectorStore implementation that uses the Zep long-term memory store as a backend.
If the collection does not exist, it will be created automatically.
Requires `@getzep/zep-c
Function that converts an array of messages into a single string prompt that can be used as input for a chat model. It delegates the conversion logic to the appropriate provider-specific function.
Function that converts an array of messages into a single string prompt that can be used as input for a chat model. It delegates the conversion logic to the appropriate provider-specific function.
Get a session for the Portkey API. If one already exists with the same options, it will be returned. Otherwise, a new session will be created.
Load a LangChain module from a serialized text representation. NOTE: This functionality is currently in beta. Loaded classes may change independently of semver.
Get a unique name for the module, rather than parent class implementations. Should not be subclassed, subclass lc_name above instead.
Condenses memory content into a single HumanMessage with context
Extracts and formats memory content into a system prompt
Converts Mem0 memories to a list of BaseMessages
Condenses Zep memory context into a single HumanMessage. This is particularly useful for models like Claude that have limitations with system messages (e.g., Anthropic's Claude only supports one syste
Extracts summary from Zep memory and composes a system prompt.
Converts Zep Memory to a list of BaseMessages, preserving the structure. Creates a SystemMessage from summary and facts, and converts the rest of the messages to their corresponding message types.
Converts a ReadableStream into a callback pattern.
Parses arbitary byte chunks into EventSource line buffers. Each line should be of the format "field: value" and ends with \r, \n, or \r\n.
Parses line buffers into EventSourceMessages.
Interface for the arguments required to create an AWS Step Functions toolkit.
The settings to instantiate the Momento standard cache.
The ChatFriendliParams interface defines the input parameters for the ChatFriendli class.
Deployed params
Project/space params
Project/space params
Deployed params
Project/space params
Deployed params
Gateway params
Project/space params
Note that the modelPath is the only required parameter. For testing you
can set this in the environment variable LLAMA_PATH.
The name and arguments of a function that should be called, as generated by the model.
Interface defining the input to the MoonshotChatInput class.
Interface defining the parameters for the Perplexity chat model.
Input to chat model class.
Interface defining the input to the ChatTencentHunyuan class.
Interface defining the input to the ChatTencentHunyuan class.
Interface defining the input to the ZhipuAIChatInput class.
Represents the parameters for configuring the CheerioWebBaseLoader. It extends the WebBaseLoaderParams interface and adds additional parameters specific to loading with Cheerio.
Interface representing the response from the Confluence API.
Interface representing a Confluence page.
Interface representing the parameters for configuring the ConfluencePagesLoader.
Interface representing a Figma file. It includes properties for the file name, role, last modified date, editor type, thumbnail URL, version, document node, schema version, main file key, and an array
Interface representing the parameters for configuring the FigmaLoader. It includes optional properties for the access token, an array of node IDs, and the file key.
An interface that represents a file in a GitHub repository. It has properties for the file name, path, SHA, size, URLs, type, and links.
An interface that represents the parameters for the GithubRepoLoader class. It extends the AsyncCallerParams interface and adds additional properties specific to the GitHub repository loader.
Represents the parameters for configuring WebBaseLoaders. It extends the AsyncCallerParams interface and adds additional parameters specific to web-based loaders.
Interface representing the parameters for configuring the JiraDocumentConverter.
Interface representing the parameters for configuring the JiraProjectLoader.
Represents the parameters for the S3Loader class. It includes properties such as the S3 bucket, key, unstructured API URL, unstructured API key, S3 configuration, file system module, and UnstructuredL
Interface representing the parameters for initializing a SitemapLoader. SitemapLoaderParams
See https://docs.sort.xyz/docs/api-keys to get your free Sort API key. See https://docs.sort.xyz for more information on the available queries. See https://docs.sort.xyz/reference for more information
Interface representing the response from the SortXYZ API.
Interface representing the parameters for the SortXYZBlockchainLoader class.
Interface representing the parameters for configuring the TaskadeLoader. It includes optional properties for the personal access token and project id.
Interface representing a Taskade project. It includes properties for the id, text, parentId and completed.
Input parameters for the DeepInfra embeddings
Response from the DeepInfra embeddings API.
Interface for the request body to generate embeddings.
Interface that extends EmbeddingsParams and defines additional parameters specific to the FireworksEmbeddings class.
Interface for GradientEmbeddings parameters. Extends EmbeddingsParams and defines additional parameters specific to the GradientEmbeddings class.
Interface that extends EmbeddingsParams and defines additional parameters specific to the HuggingFaceInferenceEmbeddings class.
Note that the modelPath is the only required parameter. For testing you
can set this in the environment variable LLAMA_PATH.
Interface for MinimaxEmbeddings parameters. Extends EmbeddingsParams and defines additional parameters specific to the MinimaxEmbeddings class.
Interface for PremEmbeddings parameters. Extends EmbeddingsParams and defines additional parameters specific to the PremEmbeddings class.
Interface that extends EmbeddingsParams and defines additional parameters specific to the TencentHunyuanEmbeddingsParams class.
Interface that extends EmbeddingsParams and defines additional parameters specific to the TencentHunyuanEmbeddingsParams class.
Interface that extends EmbeddingsParams and defines additional parameters specific to the TensorFlowEmbeddings class.
Interface for TogetherAIEmbeddingsParams parameters. Extends EmbeddingsParams and defines additional parameters specific to the TogetherAIEmbeddings class.
Interface for the request body to generate embeddings.
Interface that extends EmbeddingsParams and defines additional parameters specific to the VoyageEmbeddings class.
Interface that extends EmbeddingsParams and defines additional parameters specific to the ZhipuAIEmbeddingsParams class.
Parameters for the GoogleVertexAIMultimodalEmbeddings class, extending both EmbeddingsParams and GoogleVertexAIConnectionParams.
Interface for AI21 input parameters.
Interface for the input parameters specific to the Aleph Alpha LLM.
The FriendliParams interface defines the input parameters for the Friendli class.
The GradientLLMParams interface defines the input parameters for the GradientLLM class.
Interface defining the parameters for configuring the Hugging Face model for text generation.
Call interface for second parameter of inbuild methods
Parameters for basic llm invoke
Parameters for basic llm invoke
Constructor input interfaces for each mode
Parameters for basic llm invoke
Note that the modelPath is the only required parameter. For testing you
can set this in the environment variable LLAMA_PATH.
The input parameters for the RaycastAI class, which extends the BaseLLMParams interface.
Interface defining the structure of the input data for the Replicate class. It includes details about the model to be used, any additional input parameters, and the API key for the Replicate service.
The SageMakerEndpointInput interface defines the input parameters for the SageMakerEndpoint class, which includes the endpoint name, client options for the SageMaker client, the content handler, and o
Note that the modelPath is the only required parameter. For testing you
can set this in the environment variable LLAMA_PATH.
Interface for the input parameters specific to the Writer model.
Interface for objects that can be serialized. This is a duck-typed interface to avoid circular imports.
Interface for the input parameters of the BaseChatMemory class.
Interface defining the structure of the input data for the Mem0Client
Interface defining the structure of the input data for the Mem0Memory class. It includes properties like memoryKey, sessionId, and apiKey.
Interface for the structure of a memory message in the Motorhead service. It includes the role and content of the message.
Interface defining the structure of the input data for the ZepMemory class. It includes properties like humanPrefix, aiPrefix, memoryKey, baseURL, sessionId, apiKey, and separateMessages.
Interface defining the structure of the input data for the ZepMemory class. It includes properties like humanPrefix, aiPrefix, memoryKey, memoryType sessionId, and apiKey.
Interface for the arguments required to initialize an Azion library.
Interface for the fields required during the initialization of a
MetalRetriever instance. It extends the BaseRetrieverInput
interface and adds a client field of type Metal.
Interface for the parameters required to initialize a RemoteRetriever instance.
Interface for the parameters required to initialize a RemoteRetriever instance.
Configuration interface for the ZepRetriever class. Extends the BaseRetrieverInput interface.
Configuration interface for the ZepRetriever class. Extends the BaseRetrieverInput interface.
Configuration options for initializing a CassandraKVStore. These options extend generic Cassandra client arguments with specific settings for key-value store operations.
CassandraKVOptions
Type definition for the input parameters required to initialize an instance of the UpstashStoreInput class.
Interface that defines the configuration for the GoogleCloudStorageDocstore. It includes the bucket name and an optional prefix.
Extends the DataStax driver's client options with additional configurations for service providers, enabling the customization of Cassandra client instances based on specific service requirements. This
Interface defining the fields required to create an instance of
DynamoDBChatMessageHistory. It includes the DynamoDB table name,
session ID, partition key, sort key, message attribute name, and
Dyna
Type for the input to the FileSystemChatMessageHistory constructor.
Interface for FirestoreDBChatMessageHistory. It includes the collection name, session ID, user ID, and optionally, the app index and configuration for the Firebase app.
The settings to instantiate the Momento chat message history.
Interface for parameters required to create an instance of AIPluginTool.
Interface for AWS Step Functions configuration.
Interface for the parameters required to instantiate a BraveSearch instance.
An object containing configuration parameters for the ConneryService class.
DataForSeoApiConfig
Base interface for the input parameters of the DynamicTool and DynamicStructuredTool classes.
Interface for the input parameters of the DynamicStructuredTool class.
Interface for the input parameters of the DynamicTool class.
Interface for parameters required by GoogleCustomSearch class.
Interface for parameters required by GooglePlacesAPI class.
Interface for parameter s required by GoogleRoutesAPI class.
Interface for parameters required by the SERPGoogleScholarAPITool class.
Interface for parameters required by SERPGoogleTrendsTool class.
Interface for the parameters that can be passed to the WikipediaQueryRun constructor.
Defines the configuration options for connecting to Astra DB, DataStax's cloud-native Cassandra-as-a-Service. This interface specifies the necessary parameters required to establish a connection with
Extends the DataStax driver's client options with additional configurations for service providers, enabling the customization of Cassandra client instances based on specific service requirements. This
Encapsulates the service provider-specific arguments required for creating a Cassandra client. This interface acts as a wrapper for configurations pertaining to various Cassandra service providers, al
Defines the configuration arguments for initializing a Cassandra table within an application.
This interface extends AsyncCallerParams, incorporating asynchronous operation configurations,
and adds
Represents the definition of a column within a Cassandra table schema. This interface is used to specify the properties of table columns during table creation and to define how columns are utilized in
Represents a filter condition used in constructing WHERE clauses for querying Cassandra tables. Filters specify the criteria used to select rows from a table, based on column values.
Properties:
Defines an index on a Cassandra table column, facilitating efficient querying by column values. This interface specifies the necessary configuration for creating secondary indexes on table columns, en
Represents a message sent in an event stream https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format
Interface defining the arguments required to create an instance of
AnalyticDBVectorStore.
Interface for the arguments required to initialize an Azion library.
Configuration options for the AzureAISearchStore constructor.
Azure AI Search settings.
Extends the DataStax driver's client options with additional configurations for service providers, enabling the customization of Cassandra client instances based on specific service requirements. This
Defines the parameters for the delete method in the Chroma class.
It can either contain an array of ids of the documents to be deleted
or a filter object to specify the documents to be deleted
Type for filtering search results in the ClickHouse database.
Arguments for the ClickHouseStore class, which include the host, port, protocol, username, password, index type, index parameters, index query params, column map, database, table.
Mapping of columns in the ClickHouse database.
Arguments for creating a CloseVectorNode instance, extending CloseVectorHNSWLibArgs.
Arguments for creating a CloseVectorWeb instance, extending CloseVectorHNSWLibArgs.
This interface define the optional fields for adding vector
ids - vector of ids for each document. If undefined, then uuid will be usedmetadata - vector of metadata object for each documentThis interface defines the fields required to initialize a query vector store These are the fields part of config:
Interface for create_index method parameters
This interface define the optional fields for adding vector
ids - vector of ids for each document. If undefined, then uuid will be usedmetadata - vector of metadata object for each documentThis interface defines the fields required to initialize a vector store These are the fields part of config:
Interface defining the arguments required to create an Elasticsearch client.
Configuration options for hybrid retrieval strategy.
Interface for the arguments required to initialize a FaissStore instance.
Allows us to create IdDocument classes that contain the ID.
Parameters necessary to configure the Matching Engine.
Used to represent parameters that are necessary to delete documents from the matching engine. These must be a list of string IDs
Information about the Matching Engine public API endpoint. Primarily exported to allow for testing.
Interface defining the arguments required to create an instance of
HanaDB.
Interface for the arguments that can be passed to the HNSWLib constructor. It extends HNSWLibBase and includes properties for the document store and HNSW index.
Interface for the base configuration of HNSWLib. It includes the space name and the number of dimensions.
Interface for LibSQLVectorStore configuration options.
Interface that defines the arguments required to create a
MariaDBStore instance. It includes MariaDB connection options,
table name and verbosity level.
Interface for the arguments required by the Milvus class constructor.
Mapping of columns in the MyScale database.
Type for filtering search results in the MyScale database.
Arguments for the MyScaleStore class, which include the host, port, protocol, username, password, index type, index parameters, column map, database, table, and metric.
Interface that defines the arguments required to create a
NeonPostgres instance. It includes Postgres connection options,
table name, filter, and verbosity level.
Interface defining the arguments required to create an instance of the OpenSearchVectorStore class. It includes the OpenSearch client, index name, and vector search options.
Interface that defines the arguments required to create a
PGVectorStore instance. It includes Postgres connection options,
table name, filter, and verbosity level.
Configuration for column types to enable proper type casting in SQL queries. This is particularly important for columns that require explicit casting, such as UUID columns in PostgreSQL.
Vector store arguments RocksetStore
Interface for the arguments required to initialize a Supabase library.
Interface that defines the arguments required to create a
TypeORMVectorStore instance. It includes Postgres connection options,
table name, filter, and verbosity level.
Typesense vector store configuration.
This interface defines the arguments for the UpstashVectorStore class.
Interface that defines the arguments that can be passed to the
USearch constructor. It includes optional properties for a
docstore, index, and mapping.
Interface for the context configuration used in Vectara API calls.
Interface for the file objects to be uploaded to Vectara.
Interface for the arguments required to initialize a VectaraStore instance.
Interface that defines the arguments required to create a
VercelPostgres instance. It includes Postgres connection options,
table name, filter, and verbosity level.
Interface for the arguments required to create a XataClient. Includes the client instance and the table name.
Interface for the arguments required to initialize a ZepVectorStore instance.
Interface for the configuration options for a ZepVectorStore instance.
Interface for the parameters required to delete documents from a ZepVectorStore instance.
Interface for the configuration options for a ZepCloudVectorStore instance.
Interface for the parameters required to delete documents from a ZepCloudVectorStore instance.
Type representing the role of a message in the Tongyi chat model.
Type representing the role of a message in the Friendli chat model.
Type representing the sender_type of a message in the Minimax chat model.
Type representing the role of a message in the Perplexity chat model.
Set the chunking_strategy to chunk text into larger or smaller elements. Defaults to None with optional arg of by_title
Represents the available hi-res models for the UnstructuredLoader. It can be one of "chipper".
To enable or disable table extraction for file types other than PDF, set the skipInferTableTypes property in the UnstructuredLoaderOptions object. The skipInferTableTypes property is an array of file
An enumeration of possible handling strategies for unknown file types.
Represents the available strategies for the UnstructuredLoader. It can be one of "hi_res", "fast", "ocr_only", or "auto".
A type that represents a function that takes a single object (an Apify dataset item) and converts it to an instance of the Document class.
Change function signature to only be asynchronous for simpli
Represents the parameters for the GoogleCloudStorageLoader class. It includes properties such as the GCS bucket, file destination, the options for the UnstructuredLoader and the options for Google Clo
Type representing a function for evaluating JavaScript code on a web page using Playwright. Takes a Page, Browser, and Response object as parameters and returns a Promise that resolves to a string.
Type representing a function for evaluating JavaScript code on a web page using Puppeteer. It takes a Page and Browser object as parameters and returns a Promise that resolves to a string.
The media should have a text property, an image property, or both.
Options for configuring the SQLiteRecordManager class.
Type definition for AI21 penalty data.
Types of standard sensitive information that can be detected.
Options for the redact function.
Represents a filter condition for querying the Azion database
Represents a database column name
Valid SQL operators that can be used in filter conditions
Type for the authentication method used by the RemoteRetriever. It can either be false (no authentication) or an object with a bearer token.
Type for the JSON response values from the remote server.
Options for the TavilySearchAPIRetriever class, which includes a BaseLanguageModel instance, a VectorStore instance, and an optional promptTemplate which can either be a BasePromptTemplate instance or
Type that defines the config required to initialize the ConvexKVStore class. It includes the table name, index name, field name.
Type definition for the input parameters required when instantiating a AuroraDsqlChatMessageHistory object.
Type that defines the config required to initialize the ConvexChatMessageHistory class. At minimum it needs a sessionId and an ActionCtx.
Represents a lightweight file chat session.
Type for the store of chat sessions.
Represents a stored chat session.
Type for the input parameter of the RedisChatMessageHistory constructor. It includes fields for the session ID, session TTL, Redis URL, Redis configuration, and Redis client.
Type definition for the input parameters required when instantiating a PlanetScaleChatMessageHistory object.
Type definition for the input parameters required when instantiating a PostgresChatMessageHistory object.
Type definition for the input parameters required to initialize an instance of the UpstashRedisChatMessageHistory class.
An object type that represents the input for the XataChatMessageHistory class.
SearchApiParameters Type Definition.
For more parameters and supported search engines, refer specific engine documentation: Google - https://www.searchapi.io/docs/google Google News - https://www.sea
Defines the parameters that can be passed to the Serper class during
instantiation. It includes gl and hl which are optional.
Defines a type for specifying WHERE clause conditions in Cassandra queries.
This can be a single Filter object, an array of Filter objects for multiple conditions,
or a Record<string, unknown> f
Represents a filter condition for querying the Azion database
Represents a database column name
Valid SQL operators that can be used in filter conditions
Azure AI Search options for adding documents.
Azure AI Search indexed document.
Azure AI Search options metadata schema. If yout want to add custom data, use the attributes property.
Azure AI Search filter type.
Azure AI Search query type.
Defines the arguments that can be passed to the Chroma class
constructor. It can either contain a url for the Chroma database, the
number of dimensions for the vectors (numDimensions), a
`collec
Type that defines the config required to initialize the ConvexVectorStore class. It includes the table name, index name, text field name, and embedding field name.
Enum for different distance strategies supported by Couchbase vector search
Defines the arguments for the LanceDB class constructor. It includes a table and an optional textKey.
Type of metric used in the MyScale database.
Functions to measure vector distance/similarity by. See https://rockset.com/docs/vector-functions/#vector-distance-functions SimilarityMetric
Type definition for the arguments required to initialize a TigrisVectorStore instance.
Type that defines the parameters for the delete method. It can either contain the target id(s) or the deleteAll config to reset all the vectors.