HarnessContentBlock

sealed class HarnessContentBlock

A content block within a message.

Inheritors

Types

Link copied to clipboard

Model reasoning content.

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

Text content.

Link copied to clipboard

A tool execution result.

Link copied to clipboard

A tool use request from the model.

Functions

Link copied to clipboard
fun asText(): String

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

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard