BedrockSessionContentBlock

A block of content that you pass to, or receive from, a Amazon Bedrock session in an invocation step. You pass the content to a session in the payLoad of the PutInvocationStep API operation. You retrieve the content with the GetInvocationStep API operation.

For more information about sessions, see Store and retrieve conversation history and context with Amazon Bedrock sessions.

Inheritors

Types

Link copied to clipboard

The image in the invocation step.

Link copied to clipboard
Link copied to clipboard
data class Text(val value: String) : BedrockSessionContentBlock

The text in the invocation step.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun asText(): String

Casts this BedrockSessionContentBlock as a Text and retrieves its kotlin.String value. Throws an exception if the BedrockSessionContentBlock is not a Text.

Link copied to clipboard

Casts this BedrockSessionContentBlock as a Text and retrieves its kotlin.String value. Returns null if the BedrockSessionContentBlock is not a Text.