Use the Type field to determine which variant is active, then access the corresponding field:
switch baseInputsPhaseUnion.Type { case components.BaseInputsPhaseUnionTypeBaseInputsPhaseCommentary: // baseInputsPhaseUnion.BaseInputsPhaseCommentary is populated case components.BaseInputsPhaseUnionTypeBaseInputsPhaseFinalAnswer: // baseInputsPhaseUnion.BaseInputsPhaseFinalAnswer is populated case components.BaseInputsPhaseUnionTypeAny: // baseInputsPhaseUnion.Any is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.