Use the Type field to determine which variant is active, then access the corresponding field:
switch trigger.Type { case components.TriggerTypeInputTokens: // trigger.AnthropicInputTokensTrigger is populated case components.TriggerTypeToolUses: // trigger.AnthropicToolUsesTrigger is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.