Use the Type field to determine which variant is active, then access the corresponding field:
switch predictionContent.Type { case components.PredictionContentTypeStr: // predictionContent.Str is populated case components.PredictionContentTypeArrayOfPredictionContentText: // predictionContent.ArrayOfPredictionContentText is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.