Skip to content

[FEATURE] Update GuardContent class to include image field #1423

@JackYPCOnline

Description

@JackYPCOnline

Problem Statement

We're adding a guardrail_latest_message feature flag to the Bedrock model provider. When enabled, only text and image content in the latest user message will be wrapped in guardContent.

Currently our GuardContent class only has text field, we should add image as well.

Proposed Solution

We should add image, reference:

format
The format details for the image type of the guardrail converse image block.

Type: String

Valid Values: png | jpeg

Required: Yes

source
The image source (image bytes) of the guardrail converse image block.

Type: [GuardrailConverseImageSource](https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_GuardrailConverseImageSource.html) object

Note: This object is a Union. Only one member of this object can be specified or returned.

Required: Yes

Use Case

when GuardContent is used.

Alternatives Solutions

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions