SystemContentBlock

sealed class SystemContentBlock

A system content block.

Inheritors

Types

Link copied to clipboard

CachePoint to include in the system prompt.

Link copied to clipboard

A content block to assess with the guardrail. Use with the Converse or ConverseStream API operations.

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

A system prompt for the model.

Functions

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

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

Link copied to clipboard

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