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

Incorrect error message in multiple tool calls assertion #735

Open
krystianMoras opened this issue Jun 7, 2024 · 1 comment
Open

Incorrect error message in multiple tool calls assertion #735

krystianMoras opened this issue Jun 7, 2024 · 1 comment

Comments

@krystianMoras
Copy link

len(message.tool_calls or []) == 1

This assertion fails if for some reason LLM does not respond e.g. connection issues. If message.tool_calls is None it does not mean that an LLM output had multiple tools.

None or []

Outputs:

[]

This means that:

len([]) == 1
False

Please change the assertion error message to sth else as this is confusing.

@jxnl
Copy link
Owner

jxnl commented Jun 7, 2024

can take a pr for this

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

No branches or pull requests

2 participants