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.
The ID of the parent run.
Optional list of tags associated with the retriever.
Optional metadata associated with the retriever.
Return whether the handler is async.
Return a copy of the edge with optional new source and target nodes.
Merge the group 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.