System - Go SDK

System type definition

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

Supported Types

1system := components.CreateSystemStr(string{/* values here */})

1system := components.CreateSystemArrayOfAnthropicTextBlockParam([]components.AnthropicTextBlockParam{/* values here */})

Union Discrimination

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

1switch system.Type {
2 case components.SystemTypeStr:
3 // system.Str is populated
4 case components.SystemTypeArrayOfAnthropicTextBlockParam:
5 // system.ArrayOfAnthropicTextBlockParam is populated
6}