Description
Describe the bug
When an agent runs with BedrockChatCompletion
using the Converse Stream API, tool parameters are not correctly parsed when more than 1 tool is used. For instance, if tool_a
and tool_b
are going to be executed with parameters {"param_11": "value_11"}
and {"param_21": "value_21"}
respectively, the parsing of content blocks in BedrockChatCompletion
produces {"param_11": "value_11"}{"param_21": "value_21"}
and {"param_21": "value_21"}
, which is wrong (in addition to be invalid JSON for the first).
To Reproduce
Define a plugin with at least 2 tools (with at least 1 parameter each) and an agent with BedrockChatCompletion
using the Converse Stream API. Then, ask the agent to run the 2 tools.
Expected behavior
Tool calls and their parameters should be correctly parsed.
Platform
- Language: Python
- Source: main branch of repository
- AI model: any
Metadata
Metadata
Assignees
Labels
Type
Projects
Status