Versions in this module Expand all Collapse all v1 v1.22.3 Feb 26, 2026 Changes in this version + const Version + func Validate(req Request) error + type Block struct + Text *Text + Thinking *Thinking + ToolResult *ToolResult + ToolUse *ToolUse + Type BlockType + type BlockType string + const BlockTypeText + const BlockTypeThinking + const BlockTypeToolResult + const BlockTypeToolUse + type ContextEntity struct + EntityID string + EntityType ContextEntityType + type ContextEntityType string + const ContextEntityTypeLogEvent + const ContextEntityTypeService + type Message struct + Content []Block + Model string + Role Role + StopReason *StopReason + type Request struct + ChatProtocolVersion string + ContextEntities []ContextEntity + ConversationID string + Messages []Message + Tools []Tool + type Role string + const RoleAssistant + const RoleUser + type StopReason string + const StopReasonEndTurn + const StopReasonToolUse + type Text struct + Content string + type Thinking struct + Content string + type Tool struct + Description string + InputSchema map[string]any + Name string + type ToolResult struct + Content json.RawMessage + Error string + IsError *bool + ToolUseID string + type ToolUse struct + ID string + Input json.RawMessage + Name string