Skip to content

Conversation

@corani
Copy link
Contributor

@corani corani commented Apr 22, 2025

Previously when multiple tool calls were requested by the LLM we got the error An assistant message with 'tool_calls' must be followed by tool messages responding to each 'tool_call_id'. although the calls were processed.

Apparently each response needs to be its own message, rather than its own block.

Closes #7

Previously when multiple tool calls were requested by the LLM we got the
error `An assistant message with 'tool_calls' must be followed by tool
messages responding to each 'tool_call_id'.` although the calls were
processed.

Apparently each response needs to be its own message, rather than its
own block.

Closes mark3labs#7
})
for _, toolResult := range toolResults {
*messages = append(*messages, history.HistoryMessage{
Role: "tool",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain about the role, but this works for me...

@ezynda3 ezynda3 merged commit 4fe66b0 into mark3labs:main Apr 23, 2025
@corani corani deleted the multiple_requests branch April 24, 2025 01:49
miyamo2 added a commit to miyamo2/slackbot-mcp-host that referenced this pull request Apr 27, 2025
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 this pull request may close these issues.

multiple requests at the same time

2 participants