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

[Feature Request]: Display warning when overwriting tool #1607

Closed
Yanni8 opened this issue Feb 9, 2024 · 1 comment · Fixed by #2159
Closed

[Feature Request]: Display warning when overwriting tool #1607

Yanni8 opened this issue Feb 9, 2024 · 1 comment · Fixed by #2159
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@Yanni8
Copy link
Contributor

Yanni8 commented Feb 9, 2024

Is your feature request related to a problem? Please describe.

Currently overriding a tool is as simple as

@user_proxy.register_for_execution(name="my-first-tool")
def do_something():
     pass

@user_proxy.register_for_execution(name="my-first-tool")
def do_something_else():
     pass

The problem is that it might happen that a user copies the annotation from the first tool without changing the name. In that case, does the first tool function get overridden by the second definition. This might be completely fine in some cases.

But it might also happen that this results in unexpected behaviors. It might make sense to display a warning when the user overrides an existing tool name.

Describe the solution you'd like

Create a warning in the console when the user overrides an existing tool function

Additional context

No response

@Yanni8 Yanni8 added the enhancement New feature or request label Feb 9, 2024
@Yanni8 Yanni8 changed the title [Feature Request]: Display warning when overriting tool [Feature Request]: Display warning when overwriting tool Feb 9, 2024
@ekzhu ekzhu added the good first issue Good for newcomers label Feb 9, 2024
@ekzhu
Copy link
Collaborator

ekzhu commented Feb 9, 2024

You are welcome to submit a pr to fix this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants