ReasoningContentBlockDelta

Contains content regarding the reasoning that is carried out by the model with respect to the content in the content block. Reasoning refers to a Chain of Thought (CoT) that the model generates to enhance the accuracy of its final response.

Inheritors

Types

Link copied to clipboard

The content in the reasoning that was encrypted by the model provider for safety reasons. The encryption doesn't affect the quality of responses.

Link copied to clipboard
Link copied to clipboard

A token that verifies that the reasoning text was generated by the model. If you pass a reasoning block back to the API in a multi-turn conversation, include the text and its signature unmodified.

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

The reasoning that the model used to return the output.

Functions

Link copied to clipboard

Casts this ReasoningContentBlockDelta as a RedactedContent and retrieves its kotlin.ByteArray value. Throws an exception if the ReasoningContentBlockDelta is not a RedactedContent.

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

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

Link copied to clipboard
fun asText(): String

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

Link copied to clipboard

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