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