langchain.callbacks.tracers.run_collector.RunCollectorCallbackHandler¶
class langchain.callbacks.tracers.run_collector.RunCollectorCallbackHandler(example_id: Optional[Union[UUID, str]] = None, **kwargs: Any)[source]¶
A tracer that collects all nested runs in a list.
This tracer is useful for inspection and evaluation purposes.
Parameters
example_id (Optional[Union[UUID, str]], default=None) – The ID of the example being traced. It can be either a UUID or a string.
Initialize the RunCollectorCallbackHandler.
Parameters
example_id (Optional[Union[UUID, str]], default=None) – The ID of the example being traced. It can be either a UUID or a string.
Attributes
ignore_agent
Whether to ignore agent callbacks.
ignore_chain
Whether to ignore chain callbacks.
ignore_chat_model
Whether to ignore chat model callbacks.
ignore_llm
Whether to ignore LLM callbacks.
ignore_retriever
Whether to ignore retriever callbacks.
ignore_retry
Whether to ignore retry callbacks.
name
raise_error
run_inline
Methods
__init__([example_id])
Initialize the RunCollectorCallbackHandler.
on_agent_action(action, *, run_id[, ...])
Run on agent action.
on_agent_finish(finish, *, run_id[, ...])
Run on agent end.
on_chain_end(outputs, *, run_id[, inputs])
End a trace for a chain run.
on_chain_error(error, *[, inputs])
Handle an error for a chain run.
on_chain_start(serialized, inputs, *, run_id)
Start a trace for a chain run.
on_chat_model_start(serialized, messages, *, ...)
Run when a chat model starts running.