Skip to content

Add support for specifying tool name when using decorator. #1087

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 10, 2025

Conversation

phemmer
Copy link
Contributor

@phemmer phemmer commented Mar 10, 2025

The Tool class supports a name parameter, but none of the function decorators did. So this adds the name parameter to the decorators and passes it through.

I'm unsure whether a change this small deserves unit tests of its own, or how you want said tests structured. So I just threw in a couple. But feel free to request changes on the subject (or change yourself).

@phemmer phemmer force-pushed the tool_name branch 2 times, most recently from d248a75 to d7997df Compare March 10, 2025 01:25
Copy link
Member

@Kludex Kludex left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 🙏

@Kludex Kludex enabled auto-merge (squash) March 10, 2025 08:12
@Kludex Kludex merged commit d6f0a13 into pydantic:main Mar 10, 2025
12 checks passed
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.

2 participants