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

Inline Agents fails with Sonnet 3.5 #449

Open
austinmw opened this issue Jan 6, 2025 · 0 comments
Open

Inline Agents fails with Sonnet 3.5 #449

austinmw opened this issue Jan 6, 2025 · 0 comments

Comments

@austinmw
Copy link

austinmw commented Jan 6, 2025

agents-and-function-calling/bedrock-agents/features-examples/15-invoke-inline-agents/inline-agent-api-usage.ipynb fails with when attempting to use Sonnet 3.5 instead of Sonnet 3.0:

{
	"name": "EventStreamError",
	"message": "An error occurred (validationException) when calling the InvokeInlineAgent operation: Validation failed for inline agent: messages.2.content.0.tool_result.tool_use_id: Field required
It can be due to following reasons
1. The tools/functions have changed.
2. Model is changed across turns and this action is not supported.
",
	"stack": "---------------------------------------------------------------------------
EventStreamError                          Traceback (most recent call last)
Cell In[2], line 21
      4 response = client.invoke_inline_agent(
      5     actionGroups=[
      6         {
   (...)
     16     sessionId='session-1'
     17 )
     19 eventstream = response.get('completion')
---> 21 for event in eventstream:
     22     print(event)

File ~/.pyenv/versions/3.11.8/lib/python3.11/site-packages/botocore/eventstream.py:592, in EventStream.__iter__(self)
    590 def __iter__(self):
    591     for event in self._event_generator:
--> 592         parsed_event = self._parse_event(event)
    593         if parsed_event:
    594             yield parsed_event

File ~/.pyenv/versions/3.11.8/lib/python3.11/site-packages/botocore/eventstream.py:608, in EventStream._parse_event(self, event)
    606     return parsed_response
    607 else:
--> 608     raise EventStreamError(parsed_response, self._operation_name)

EventStreamError: An error occurred (validationException) when calling the InvokeInlineAgent operation: Validation failed for inline agent: messages.2.content.0.tool_result.tool_use_id: Field required
It can be due to following reasons
1. The tools/functions have changed.
2. Model is changed across turns and this action is not supported.
"
}
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

No branches or pull requests

1 participant