class FakeTracerCreate and add a run to the run map for chain start events.
Create and add a run to the run map for chat model start events.
Create and add a run to the run map for LLM start events.
Create and add a run to the run map for retriever start events.
Create and add a run to the run map for tool start events.
Called when an agent is about to execute an action,
Called when an agent finishes execution, before it exits.
Called at the end of a Chain run, with the outputs and the run ID.
Called if a Chain run encounters an error
Called at the start of a Chain run, with the chain name and inputs
Called at the start of a Chat Model run, with the prompt(s)
Called at the end of an LLM/ChatModel run, with the output and the run ID.
Called if an LLM/ChatModel run encounters an error
Called when an LLM/ChatModel in streaming mode produces a new token
Called at the start of an LLM or Chat Model run, with the prompt(s)
Called at the end of a Tool run, with the tool output and the run ID.
Called if a Tool run encounters an error
Called when a streaming tool yields a partial value. Tools that are async generators
Called at the start of a Tool run, with the tool name and input
The name of the serializable. Override to provide an alias or
A path to the module that contains the class, eg. ["langchain", "llms"]
Called when an agent is about to execute an action,
Called when an agent finishes execution, before it exits.
Called at the end of a Chain run, with the outputs and the run ID.
A path to the module that contains the class, eg. ["langchain", "llms"] Usually should be the same as the entrypoint the class is exported from.
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.