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}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.