AnthropicImageBlockParamSource - Go SDK

AnthropicImageBlockParamSource type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

AnthropicBase64ImageSource

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

AnthropicURLImageSource

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

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:

1switch anthropicImageBlockParamSource.Type {
2 case components.AnthropicImageBlockParamSourceTypeBase64:
3 // anthropicImageBlockParamSource.AnthropicBase64ImageSource is populated
4 case components.AnthropicImageBlockParamSourceTypeURLObj:
5 // anthropicImageBlockParamSource.AnthropicURLImageSource is populated
6}