Skip to content

[BUG] The content field in the Message object at messages.XX is empty #514

@scandura

Description

@scandura

Checks

  • I have updated to the lastest minor and patch version of Strands
  • I have checked the documentation and this is not expected behavior
  • I have searched ./issues and there are no duplicates of my issue

Strands Version

1.0.1

Python Version

3.11

Operating System

AWS Lambda

Installation Method

pip

Steps to Reproduce

Create a Agent and a S3 Session Manager and tools to process images with any Anthropic LLM using Bedrock

Expected Behavior

The payload to process messages with ConverseStream have information about to send images, videos and documents for LLMs.

Actual Behavior

When have any message history with media info, the Strands don't format correctly the payload and the application receive the error: An error occurred (ValidationException) when calling the ConverseStream operat

ion: The content field in the Message object at messages.XX is empty. Add a ContentBlock object to the content field and try again.

Additional Context

No response

Possible Solution

There is the method format_request In the class bedrock.py, you can add a check on the messages to avoid empty content block, or detect a image and format correctly the payload.

Related Issues

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions