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

Failed to coerce argument 'room_numbers' to list[int]: Unsupported annotation: list[int] #2430

Open
2 tasks done
lemorage opened this issue Feb 13, 2025 · 3 comments · May be fixed by #2440
Open
2 tasks done

Failed to coerce argument 'room_numbers' to list[int]: Unsupported annotation: list[int] #2430

lemorage opened this issue Feb 13, 2025 · 3 comments · May be fixed by #2440

Comments

@lemorage
Copy link
Contributor

Describe the bug
My tool definition:

def create_a_staging_order_for_booking_a_room(
    user_id: str,
    user_name: str,
    user_contact: str,
    check_in_date: str,
    check_out_date: str,
    num_of_guests: int,
    room_numbers: list[int],
) -> dict[str, dict]:

I have a tool shown above, attached to an agent. When this agent executed this tool, I got the error message saying:

  "message": "Error executing function create_a_staging_order_for_booking_a_room:
              ValueError: Failed to coerce argument 'room_numbers' to list[int]: Unsupported annotation: list[int]"

The following line is the bug source:

arg_type = resolve_type(annotation_str)

Please describe your setup

  • How did you install letta?
    • pip install letta
  • Describe your setup
    • What's your OS? MacOS
    • How are you running letta? Terminal

Letta Config

[defaults]
preset = memgpt_chat
persona = sam_pov
human = basic

[archival_storage]
type = chroma
path = /Users/clannad/.letta/chroma

[recall_storage]
type = sqlite
path = /Users/clannad/.letta

[metadata_storage]
type = sqlite
path = /Users/clannad/.letta

[version]
letta_version = 0.6.23
@lemorage lemorage linked a pull request Feb 17, 2025 that will close this issue
@lemorage
Copy link
Contributor Author

@mattzh72 any updates on this? I hope this fix can be merged in the patch releases not soon :)

@cpacker
Copy link
Collaborator

cpacker commented Feb 25, 2025

What happens if you do List[int]?

@lemorage
Copy link
Contributor Author

It will show error msg like that instead :(

"Error executing function create_a_staging_order_for_booking_a_room:
ValueError: Failed to coerce argument 'room_numbers' to List[int]: Unsupported annotation: List[int]"

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 a pull request may close this issue.

2 participants