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