Use the Type field to determine which variant is active, then access the corresponding field:
switch anthropicImageBlockParamSource.Type { case components.AnthropicImageBlockParamSourceTypeBase64: // anthropicImageBlockParamSource.AnthropicBase64ImageSource is populated case components.AnthropicImageBlockParamSourceTypeURLObj: // anthropicImageBlockParamSource.AnthropicURLImageSource is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.