Interface BetaRawContentBlockStartEvent.ContentBlock.Visitor
-
- All Implemented Interfaces:
public interface BetaRawContentBlockStartEvent.ContentBlock.Visitor<T extends Object>An interface that defines how to map each variant of ContentBlock to a value of type T.
-
-
Method Summary
-
-
Method Detail
-
visitText
abstract T visitText(BetaTextBlock text)
-
visitThinking
abstract T visitThinking(BetaThinkingBlock thinking)
-
visitRedactedThinking
abstract T visitRedactedThinking(BetaRedactedThinkingBlock redactedThinking)
-
visitToolUse
abstract T visitToolUse(BetaToolUseBlock toolUse)
-
visitServerToolUse
abstract T visitServerToolUse(BetaServerToolUseBlock serverToolUse)
-
visitWebSearchToolResult
abstract T visitWebSearchToolResult(BetaWebSearchToolResultBlock webSearchToolResult)
-
visitWebFetchToolResult
abstract T visitWebFetchToolResult(BetaWebFetchToolResultBlock webFetchToolResult)
-
visitAdvisorToolResult
abstract T visitAdvisorToolResult(BetaAdvisorToolResultBlock advisorToolResult)
-
visitCodeExecutionToolResult
abstract T visitCodeExecutionToolResult(BetaCodeExecutionToolResultBlock codeExecutionToolResult)
-
visitBashCodeExecutionToolResult
abstract T visitBashCodeExecutionToolResult(BetaBashCodeExecutionToolResultBlock bashCodeExecutionToolResult)
-
visitTextEditorCodeExecutionToolResult
abstract T visitTextEditorCodeExecutionToolResult(BetaTextEditorCodeExecutionToolResultBlock textEditorCodeExecutionToolResult)
-
visitToolSearchToolResult
abstract T visitToolSearchToolResult(BetaToolSearchToolResultBlock toolSearchToolResult)
-
visitMcpToolUse
abstract T visitMcpToolUse(BetaMcpToolUseBlock mcpToolUse)
-
visitMcpToolResult
abstract T visitMcpToolResult(BetaMcpToolResultBlock mcpToolResult)
-
visitContainerUpload
abstract T visitContainerUpload(BetaContainerUploadBlock containerUpload)
Response model for a file uploaded to the container.
-
visitCompaction
abstract T visitCompaction(BetaCompactionBlock compaction)
A compaction block returned when autocompact is triggered.
When content is None, it indicates the compaction failed to produce a valid summary (e.g., malformed output from the model). Clients may round-trip compaction blocks with null content; the server treats them as no-ops.
-
visitFallback
abstract T visitFallback(BetaFallbackBlock fallback)
Marks the point in
contentwhere one model's output gives way to the next.One block appears per hop where a preceding model actually ran this turn and declined. A turn routed directly by the sticky decision has no such boundary and carries no block — the signal for whether a fallback model served the response is the presence of a
fallback_messageentry inusage.iterations, not this block.The block is treated like a server-tool content block for streaming: it arrives via the standard
content_block_start/content_block_stoppair and carries no deltas.
-
unknown
T unknown(JsonValue json)
Maps an unknown variant of ContentBlock to a value of type T.
An instance of ContentBlock can contain an unknown variant if it was deserialized from data that doesn't match any known variant. For example, if the SDK is on an older version than the API, then the API may respond with new variants that the SDK is unaware of.
-
-
-
-