TODO: maybe also pass through run_manager is _run supports kwargs        256 new_arg_supported = signature(self._run).parameters.get("run_manager")    --> 257 run_manager = callback_manager.on_tool_start(        258     {"name": self.name, "description": self.description},        259     tool_input if isinstance(tool_input, str) else str(tool_input),        260     color=start_color,        261     **kwargs,        262 )        263 try:        264     tool_args, tool_kwargs = self._to_args_and_kwargs(parsed_input)    File ~/langchain/langchain/callbacks/manager.py:672, in CallbackManager.on_tool_start(self, serialized, input_str, run_id, parent_run_id, **kwargs)        669 if run_id is None:        670     run_id = uuid4()    --> 672 _handle_event(        673     self.handlers,        674     "on_tool_start",        675     "ignore_agent",        676     serialized,        677     input_str,        678     run_id=run_id,        679     parent_run_id=self.parent_run_id,        680     **kwargs,        681 )        683 return CallbackManagerForToolRun(        684     run_id, self.handlers, self.inheritable_handlers, self.parent_run_id        685 )    File ~/langchain/langchain/callbacks/manager.py:157, in _handle_event(handlers, event_name, ignore_condition_name, *args, **kwargs)        155 except Exception as e:        156     if handler.raise_error:    --> 157         raise e        158     logging.warning(f"Error in {event_name} callback: {e}")    File ~/langchain/langchain/callbacks/manager.py:139, in _handle_event(handlers, event_name, ignore_condition_name, *args, **kwargs)        135 try:        136     if ignore_condition_name is None or not getattr(        137         handler, ignore_condition_name        138     ):    --> 139         getattr(handler, event_name)(*args, **kwargs)        140 except NotImplementedError as e:        141     if event_name == "on_chat_model_start":    File ~/langchain/langchain/callbacks/human.py:48, in
This walkthrough demonstrates how to add human validation to any Tool. We'll do this using the HumanApprovalCallbackhandler.
This walkthrough demonstrates how to add human validation to any Tool. We'll do this using the HumanApprovalCallbackhandler. ->: TODO: maybe also pass through run_manager is _run supports kwargs        256 new_arg_supported = signature(self._run).parameters.get("run_manager")    --> 257 run_manager = callback_manager.on_tool_start(        258     {"name": self.name, "description": self.description},        259     tool_input if isinstance(tool_input, str) else str(tool_input),        260     color=start_color,        261     **kwargs,        262 )        263 try:        264     tool_args, tool_kwargs = self._to_args_and_kwargs(parsed_input)    File ~/langchain/langchain/callbacks/manager.py:672, in CallbackManager.on_tool_start(self, serialized, input_str, run_id, parent_run_id, **kwargs)        669 if run_id is None:        670     run_id = uuid4()    --> 672 _handle_event(        673     self.handlers,        674     "on_tool_start",        675     "ignore_agent",        676     serialized,        677     input_str,        678     run_id=run_id,        679     parent_run_id=self.parent_run_id,        680     **kwargs,        681 )        683 return CallbackManagerForToolRun(        684     run_id, self.handlers, self.inheritable_handlers, self.parent_run_id        685 )    File ~/langchain/langchain/callbacks/manager.py:157, in _handle_event(handlers, event_name, ignore_condition_name, *args, **kwargs)        155 except Exception as e:        156     if handler.raise_error:    --> 157         raise e        158     logging.warning(f"Error in {event_name} callback: {e}")    File ~/langchain/langchain/callbacks/manager.py:139, in _handle_event(handlers, event_name, ignore_condition_name, *args, **kwargs)        135 try:        136     if ignore_condition_name is None or not getattr(        137         handler, ignore_condition_name        138     ):    --> 139         getattr(handler, event_name)(*args, **kwargs)        140 except NotImplementedError as e:        141     if event_name == "on_chat_model_start":    File ~/langchain/langchain/callbacks/human.py:48, in