import { ... } from "@langchain/core/utils/testing";Base class for all chat message histories. All chat message histories should extend this class.
Base class for chat models. It extends the BaseLanguageModel class and provides methods for generating chat based on input messages.
A class that provides fake embeddings by overriding the embedDocuments and embedQuery methods to return fixed values.
Base class for all list chat message histories. All list chat message histories should extend this class.
A fake Chat Model that returns a predefined list of responses. It can be used for testing purposes.
LLM class that provides a simpler interface to subclass than BaseLLM.
Requires only implementing a simpler _call method instead of _generate.
Abstract base class for a document retrieval system, designed to process string queries and return the most relevant documents from a source.
BaseRetriever provides common properties and methods for derived retrievers,
such as callbacks, tagging, and verbose logging. Custom retrieval systems
should extend this class and implement _getRelevantDocuments to define
the specific retrieval logic.
A Runnable is a generic unit of work that can be invoked, batched, streamed, and/or transformed.
Parser for comma-separated values. It splits the input text by commas and trims the resulting values.
Base class for chat models. It extends the BaseLanguageModel class and provides methods for generating chat based on input messages.
LLM class that provides a simpler interface to subclass than BaseLLM.
Requires only implementing a simpler _call method instead of _generate.
Base class for Tools that accept input of any shape defined by a Zod schema.
Abstract base class for creating callback handlers in the LangChain framework. It provides a set of optional methods that can be overridden in derived classes to handle various events during the execution of a LangChain application.
Class that extends VectorStore to store vectors in memory. Provides
methods for adding documents, performing similarity searches, and
creating instances from texts, documents, or an existing index.
Abstract base class for creating callback handlers in the LangChain framework. It provides a set of optional methods that can be overridden in derived classes to handle various events during the execution of a LangChain application.
A class that provides synthetic embeddings by overriding the embedDocuments and embedQuery methods to generate embeddings based on the input documents. The embeddings are generated by converting each document into chunks, calculating a numerical value for each chunk, and returning an array of these values as the embedding.
Interface for the input parameters specific to the Fake List Chat model.
Represents the call options for a base chat model.
Interface specific to the Fake Streaming Chat model.
Interface for the Constructor-field specific to the Fake Streaming Chat model (all optional because we fill in defaults).
Parameters for the Tool classes.
Interface for the arguments that can be passed to the
FakeVectorStore constructor. It includes an optional similarity
function.
Minimal shape actually needed by bindTools