Text

@SerialName(value = "text")
data class Text(val text: String, val cacheControl: AnthropicCacheControl? = null) : AnthropicContent(source)

Represents a text-based content within the AnthropicContent hierarchy.

This class is used to encapsulate textual data. Instances of this class are serialized with the discriminator "text" to identify their type in the context of polymorphic serialization.

Constructors

Link copied to clipboard
constructor(text: String, cacheControl: AnthropicCacheControl? = null)

Properties

Link copied to clipboard

Optional cache control directive for explicit breakpoint prompt caching. When set on the last content block in the list, all content blocks are eligible for caching.

Link copied to clipboard

The textual content being represented.