Use the Type field to determine which variant is active, then access the corresponding field:
switch anthropicDocumentBlockParamContent1.Type { case components.AnthropicDocumentBlockParamContent1TypeImage: // anthropicDocumentBlockParamContent1.AnthropicImageBlockParam is populated case components.AnthropicDocumentBlockParamContent1TypeText: // anthropicDocumentBlockParamContent1.AnthropicTextBlockParam is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.