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

[BUG]Error: 400 An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id' #3941

Open
refugedesigns opened this issue Jan 29, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@refugedesigns
Copy link

refugedesigns commented Jan 29, 2025

Describe the bug
In an Agent Flow if a tool node is given more than 2 tools and the agent tries to use a tool for consecutive times, it result in an error using the same tool many times: "Error: Error: 400 An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. The following tool_call_ids did not have response messages: call_UzOyM20UXD9jSKzzZ2gFk3mU"

To Reproduce
Steps to reproduce the behavior:

  1. Create An Agent Sequencial Flow.
  2. Give at least 3 tools to an agent with the toolnode.
  3. Save and start the conversation asking questions which will make the agent use 1 tool many times or switch between using the tools many times.

Expected behavior
Agent should be able to use tools freely no many how many times without breaking the chatflow

Screenshots

Image

Image

Flow

CHAT_BUDDY_PROTOTYPE_Agents.json

Setup

  • Installation: docker
  • Flowise Version 2.2.4
  • OS:Windows
  • Browser: Brave
@refugedesigns
Copy link
Author

refugedesigns commented Jan 29, 2025

The tool call happends and you see the tool output in the chat on the canvas then the error follows. I think the toolNode is generating the error since the error happends after updating the state with the result from the tool

@HenryHengZJ HenryHengZJ added the bug Something isn't working label Feb 4, 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
None yet
Development

No branches or pull requests

2 participants