langchain_core.callbacks.base.ToolManagerMixin¶

class langchain_core.callbacks.base.ToolManagerMixin[source]¶

Mixin for tool callbacks.

Methods

__init__()

on_tool_end(output, *, run_id[, parent_run_id])

Run when tool ends running.

on_tool_error(error, *, run_id[, parent_run_id])

Run when tool errors.

__init__()¶
on_tool_end(output: Any, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) Any[source]¶

Run when tool ends running.

Parameters
  • output (Any) –

  • run_id (UUID) –

  • parent_run_id (Optional[UUID]) –

  • kwargs (Any) –

Return type

Any

on_tool_error(error: BaseException, *, run_id: UUID, parent_run_id: Optional[UUID] = None, **kwargs: Any) Any[source]¶

Run when tool errors.

Parameters
  • error (BaseException) –

  • run_id (UUID) –

  • parent_run_id (Optional[UUID]) –

  • kwargs (Any) –

Return type

Any