Skip to content

Conversation

@aledelunap
Copy link
Contributor

@aledelunap aledelunap commented Jun 20, 2023

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.

@vercel
Copy link

vercel bot commented Jun 20, 2023

@aledelunap is attempting to deploy a commit to the LangChain Team on Vercel.

A member of the Team first needs to authorize it.

@aledelunap aledelunap closed this Jun 20, 2023
@aledelunap
Copy link
Contributor Author

Closed in favor of PR #6483, to make the PR from a dedicated branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tools: Inconsistent callbacks/run_manager parameter

1 participant