Skip to main content
The Go SDK and docs are currently in beta. Report issues on GitHub.

Supported Types

ContentText

content := operations.CreateContentText(operations.ContentText{/* values here */})

ContentImageURL

content := operations.CreateContentImageURL(operations.ContentImageURL{/* values here */})

ContentPartInputAudio

content := operations.CreateContentInputAudio(components.ContentPartInputAudio{/* values here */})

ContentPartInputVideo

content := operations.CreateContentInputVideo(components.ContentPartInputVideo{/* values here */})

ContentPartInputFile

content := operations.CreateContentInputFile(components.ContentPartInputFile{/* values here */})

Union Discrimination

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
}