Callback manager for LangChain.
CallbackManager(
self,
handlers: list[BaseCallbackHandler],
inheritable_handlers: list[BaseCallbackHandler] | None = None,
parent_run_id: UUID | None = None,
*,
tags: list[str] | None = None,
inheritable_tags: list[str] | None = None,
metadata: dict[str, Any] | None = None,
inheritable_metadata: dict[str, Any] | None = None
)Run when LLM starts running.
Run when chat model starts running.
Run when chain starts running.
Run when tool starts running.
Run when the retriever starts running.
Dispatch an adhoc event to the handlers (async version).
This event should NOT be used in any internal LangChain code. The event is meant specifically for users of the library to dispatch custom events that are tailored to their application.
Configure the callback manager.
Return a copy of the callback manager.
Merge the callback manager with another callback manager.
Add a handler to the callback manager.
Remove a handler from the callback manager.
Set handlers as the only handlers on the callback manager.
Set handler as the only handler on the callback manager.
Add tags to the callback manager.
Remove tags from the callback manager.
Add metadata to the callback manager.
Remove metadata from the callback manager.