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

Supported Types

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

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

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:
switch system.Type {
	case components.SystemTypeStr:
		// system.Str is populated
	case components.SystemTypeArrayOfAnthropicTextBlockParam:
		// system.ArrayOfAnthropicTextBlockParam is populated
}