Parameters
text (str) – The received text.
Returns
The result of the callback.
Return type
Any
on_tool_end(output: str, **kwargs: Any) → None[source]¶
Run when tool ends running.
Parameters
output (str) – The output of the tool.
on_tool_error(error: BaseException, **kwargs: Any) → None[source]¶
Run when tool errors.
Parameters
error (Exception or KeyboardInterrupt) – The error.
Examples using CallbackManagerForToolRun¶
Defining Custom Tools