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

Issue with Parallel Tool calling the QuerySQLDataBaseTool #204

Closed
anthony2261 opened this issue Jun 15, 2024 · 0 comments · Fixed by #211
Closed

Issue with Parallel Tool calling the QuerySQLDataBaseTool #204

anthony2261 opened this issue Jun 15, 2024 · 0 comments · Fixed by #211
Labels
bug Something isn't working

Comments

@anthony2261
Copy link
Collaborator

If the ai calls QuerySQLDataBaseTool more than once in a single shot, we get the openai.BadRequestError: Error code: 400 error "An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'

Reason for this is because inside the QuerySQLDataBaseTool, we append a tool message and an ai message each time
image

And so we get tool messages separated by ai messages, which is problematic
image

This can also happen if another tool is used alongside the QuerySQLDataBaseTool

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
None yet
1 participant