Use the Type field to determine which variant is active, then access the corresponding field:
switch content.Type { case operations.ContentTypeText: // content.ContentText is populated case operations.ContentTypeImageURL: // content.ContentImageURL is populated case operations.ContentTypeInputAudio: // content.ContentPartInputAudio is populated case operations.ContentTypeInputVideo: // content.ContentPartInputVideo is populated case operations.ContentTypeInputFile: // content.ContentPartInputFile is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.