You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a tool is used multiple times by a bedrockLLMAgent to answer a query, and the agent is in streaming mode, I'd expect everything to proceed well.
Current Behaviour
If a tool is used more than once in streaming mode (tried with both Nova Pro and Claude 3.5), multiple objects arrive in bedrockLLMAgent.handleStreamingResponse, like this:
In these cases, the line in handleStreamingResponse which parses it, always fails:
toolBlock.input = JSON.parse(inputString)
The BedrockLLMAgent should see this is happening (somehow), and break up the objects before parsing perhaps? I am not sure what the right behavior here should be, but I am reporting that it isn't working at all in these circumstances.
Code snippet
Idon'thaveasimplecodesnipperhere, myapologies...
Possible Solution
No response
Steps to Reproduce
Create a bedrockLLMAgent which uses either Claude 3.5 or Nova Pro. Create a tool which will search your database according to fields "city", "job_title", or "building" (all of which are optional). Then ask a question such as:
"Tell me the names of employees in los angeles who are either in accounting or whose office is building 32."
You then get multiple tool use (which is correct), as follows:
The user wants information about their employees in Los Angeles who are in accounting or who are in building 32. I need to use the EmployeeTool to search for empoyees based on the city, job title, and building. I will perform two searches: one for employees in accounting and another for employees in building 32.
But I don't believe these tool inputs are ever dispatched to the tool handler, because it crashed upon parsing the inputs.
The text was updated successfully, but these errors were encountered:
Expected Behaviour
If a tool is used multiple times by a bedrockLLMAgent to answer a query, and the agent is in streaming mode, I'd expect everything to proceed well.
Current Behaviour
If a tool is used more than once in streaming mode (tried with both Nova Pro and Claude 3.5), multiple objects arrive in bedrockLLMAgent.handleStreamingResponse, like this:
{"city":"los angeles","job_title":"accounting"}{"city":"los angeles","building":"32"}
In these cases, the line in handleStreamingResponse which parses it, always fails:
toolBlock.input = JSON.parse(inputString)
The BedrockLLMAgent should see this is happening (somehow), and break up the objects before parsing perhaps? I am not sure what the right behavior here should be, but I am reporting that it isn't working at all in these circumstances.
Code snippet
Possible Solution
No response
Steps to Reproduce
Create a bedrockLLMAgent which uses either Claude 3.5 or Nova Pro. Create a tool which will search your database according to fields "city", "job_title", or "building" (all of which are optional). Then ask a question such as:
"Tell me the names of employees in los angeles who are either in accounting or whose office is building 32."
You then get multiple tool use (which is correct), as follows:
The user wants information about their employees in Los Angeles who are in accounting or who are in building 32. I need to use the EmployeeTool to search for empoyees based on the city, job title, and building. I will perform two searches: one for employees in accounting and another for employees in building 32.
But I don't believe these tool inputs are ever dispatched to the tool handler, because it crashed upon parsing the inputs.
The text was updated successfully, but these errors were encountered: