Use the Type field to determine which variant is active, then access the corresponding field:
switch outputCodeInterpreterCallItemOutputUnion.Type { case components.OutputCodeInterpreterCallItemOutputUnionTypeImage: // outputCodeInterpreterCallItemOutputUnion.OutputImage is populated case components.OutputCodeInterpreterCallItemOutputUnionTypeLogs: // outputCodeInterpreterCallItemOutputUnion.OutputLogs is populated default: // Unknown type - use outputCodeInterpreterCallItemOutputUnion.GetUnknownRaw() for raw JSON}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.