Use the Type field to determine which variant is active, then access the corresponding field:
switch embedding.Type { case operations.EmbeddingTypeArrayOfNumber: // embedding.ArrayOfNumber is populated case operations.EmbeddingTypeStr: // embedding.Str is populated}
⌘I
Assistant
Responses are generated using AI and may contain mistakes.