Skip to main content
The Go SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

AnthropicBase64ImageSource

anthropicImageBlockParamSource := components.CreateAnthropicImageBlockParamSourceBase64(components.AnthropicBase64ImageSource{/* values here */})

AnthropicURLImageSource

anthropicImageBlockParamSource := components.CreateAnthropicImageBlockParamSourceURLObj(components.AnthropicURLImageSource{/* values here */})

Union Discrimination

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
}