mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
980c865174
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 |
||
---|---|---|
.. | ||
agents | ||
callbacks | ||
chains | ||
chat_models | ||
client | ||
data | ||
docstore | ||
document_loaders | ||
evaluation | ||
examples | ||
llms | ||
load | ||
memory | ||
output_parsers | ||
prompts | ||
retrievers | ||
tools | ||
utilities | ||
vectorstores | ||
__init__.py | ||
conftest.py | ||
test_bash.py | ||
test_dependencies.py | ||
test_document_transformers.py | ||
test_formatting.py | ||
test_math_utils.py | ||
test_pytest_config.py | ||
test_python.py | ||
test_schema.py | ||
test_sql_database_schema.py | ||
test_sql_database.py | ||
test_text_splitter.py |