System - Go SDK
The Go SDK and docs are currently in beta. Report issues on GitHub.
1system := components.CreateSystemStr(string{/* values here */})
1system := components.CreateSystemArrayOfAnthropicTextBlockParam([]components.AnthropicTextBlockParam{/* values here */})
Use the Type field to determine which variant is active, then access the corresponding field:
Type
1switch system.Type {2 case components.SystemTypeStr:3 // system.Str is populated4 case components.SystemTypeArrayOfAnthropicTextBlockParam:5 // system.ArrayOfAnthropicTextBlockParam is populated6}