Skip to content
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

fix: remove the missing arg name from create_tool in client.py #2428

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

azinasg
Copy link

@azinasg azinasg commented Feb 12, 2025

his commit modifies the create_tool method to automatically derive the name of the tool from the function's name attribute instead of requiring it as a parameter.

Please describe the purpose of this pull request.
The purpose of this pull request is to fix a bug. The bug occurred because the name variable was missing in the function signature of the create_tool method. The fix automatically derives the tool's name from the function's name attribute, removing the need for it as a separate parameter.

How to test
Yes, this fix has been tested locally with a few functions and the tool names are set correctly. However, the testing wasn’t extensive. Please check the solution and let me know if the function still needs the name parameter or if this fix works.

Have you tested this PR?
N/A

Related issues or PRs
N/A

Is your PR over 500 lines of code?
No, this PR changes 2 lines of code.

Additional context
N/A

his commit modifies the create_tool method to automatically derive the name of the tool from the function's __name__ attribute instead of requiring it as a parameter.
@azinasg azinasg marked this pull request as draft February 12, 2025 16:31
@azinasg azinasg marked this pull request as ready for review February 12, 2025 16:32
@azinasg azinasg marked this pull request as draft February 12, 2025 16:33
@azinasg azinasg marked this pull request as ready for review February 12, 2025 16:33
@azinasg azinasg changed the title Remove the missing arg name from create_tool() in client.py fix: remove the missing arg name from create_tool in client.py Feb 12, 2025
@sarahwooders
Copy link
Collaborator

@azinasg could you please use the official Python SDK instead? We are going to deprecate LocalClient and RESTClient

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