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