Skip to content

[Bug]: list types in functions for tools are failing #1663

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

Open
marklysze opened this issue Apr 17, 2025 · 1 comment
Open

[Bug]: list types in functions for tools are failing #1663

marklysze opened this issue Apr 17, 2025 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@marklysze
Copy link
Collaborator

Describe the bug

When a function is converted to a tool it can cause a crash if it has a parameter that is a list.

Raised as an issue on Discord, message link.

The code in this cookbook example is noted as an issue:
https://docs.ag2.ai/latest/docs/user-guide/advanced-concepts/pattern-cookbook/feedback_loop/#agent-flow

The submit_document_plan function has a parameter outline: Annotated[list[str], "Outline points for the document"] and this is causing an error in get_load_param_if_needed_function in function_utils.py.

I did create a PR to fix this but @davorrunje has noted there may be an alternative way as the original code was put in place due to Python 3.8 support, which we have now moved on from:
#1662

Steps to reproduce

No response

Model Used

No response

Expected Behavior

No response

Screenshots and logs

No response

Additional Information

No response

@marklysze marklysze added the bug Something isn't working label Apr 17, 2025
@marklysze marklysze added this to ag2 Apr 17, 2025
@marklysze
Copy link
Collaborator Author

Note: We have merged the fix I put in place but, @kumaranvpl, can you please consider whether the fix is a final solution.

@kumaranvpl kumaranvpl moved this to Todo in ag2 Apr 18, 2025
@kumaranvpl kumaranvpl moved this from Todo to In Progress in ag2 Apr 21, 2025
@kumaranvpl kumaranvpl moved this from In Progress to Todo in ag2 Apr 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Todo
Development

No branches or pull requests

2 participants