Skip to content

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

@marklysze

Description

@marklysze

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions