AnthropicStreamDelta

data class AnthropicStreamDelta(val type: String? = null, val text: String? = null, val partialJson: String? = null, val stopReason: String? = null, val thinking: String? = null, val toolUse: AnthropicContent.ToolUse? = null)(source)

Represents a delta update from the Anthropic stream response.

This class encapsulates information regarding the type of update, optional textual content, and optional tool usage data. For more information: https://platform.claude.com/docs/en/build-with-claude/streaming

Constructors

Link copied to clipboard
constructor(type: String? = null, text: String? = null, partialJson: String? = null, stopReason: String? = null, thinking: String? = null, toolUse: AnthropicContent.ToolUse? = null)

Properties

Link copied to clipboard

Optional partial JSON content for tool use streaming.

Link copied to clipboard

Optional reason why the generation process was stopped, if applicable.

Link copied to clipboard
val text: String?

Optional text content associated with the delta update.

Link copied to clipboard
Link copied to clipboard

Optional tool usage data associated with the delta update (deprecated).

Link copied to clipboard
val type: String?

The type of the update provided by Anthropic. Delta type is string because of https://docs.claude.com/en/docs/build-with-claude/streaming#other-events