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

Supported Types

AnthropicThinkingTurns

keep := components.CreateKeepAnthropicThinkingTurns(components.AnthropicThinkingTurns{/* values here */})

KeepAll

keep := components.CreateKeepKeepAll(components.KeepAll{/* values here */})

KeepEnum

keep := components.CreateKeepKeepEnum(components.KeepEnum{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:
switch keep.Type {
	case components.KeepUnionTypeAnthropicThinkingTurns:
		// keep.AnthropicThinkingTurns is populated
	case components.KeepUnionTypeKeepAll:
		// keep.KeepAll is populated
	case components.KeepUnionTypeKeepEnum:
		// keep.KeepEnum is populated
}