Files
langchain/tests/unit_tests
Alejandra De Luna 980c865174 fix: remove callbacks arg from Tool and StructuredTool inferred schema (#6483)
Fixes #5456 

This PR removes the `callbacks` argument from a tool's schema when
creating a `Tool` or `StructuredTool` with the `from_function` method
and `infer_schema` is set to `True`. The `callbacks` argument is now
removed in the `create_schema_from_function` and `_get_filtered_args`
methods. As suggested by @vowelparrot, this fix provides a
straightforward solution that minimally affects the existing
implementation.

A test was added to verify that this change enables the expected use of
`Tool` and `StructuredTool` when using a `CallbackManager` and inferring
the tool's schema.

  - @hwchase17
2023-06-23 01:48:27 -07:00
..
2023-06-11 10:09:22 -07:00
2023-06-23 01:11:01 -07:00
2023-06-16 11:52:56 -07:00
2023-06-11 10:09:22 -07:00
2023-05-19 15:27:50 -07:00
2023-05-22 16:43:07 -07:00