Use the Type field to determine which variant is active, then access the corresponding field:
switch openAIResponsesAnnotation.Type { case components.OpenAIResponsesAnnotationTypeFileCitation: // openAIResponsesAnnotation.FileCitation is populated case components.OpenAIResponsesAnnotationTypeURLCitation: // openAIResponsesAnnotation.URLCitation is populated case components.OpenAIResponsesAnnotationTypeFilePath: // openAIResponsesAnnotation.FilePath is populated default: // Unknown type - use openAIResponsesAnnotation.GetUnknownRaw() for raw JSON}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.