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

Supported Types

chatSystemMessageContent := components.CreateChatSystemMessageContentStr(string{/* values here */})

chatSystemMessageContent := components.CreateChatSystemMessageContentArrayOfChatContentText([]components.ChatContentText{/* values here */})

Union Discrimination

Use the Type field to determine which variant is active, then access the corresponding field:
switch chatSystemMessageContent.Type {
	case components.ChatSystemMessageContentTypeStr:
		// chatSystemMessageContent.Str is populated
	case components.ChatSystemMessageContentTypeArrayOfChatContentText:
		// chatSystemMessageContent.ArrayOfChatContentText is populated
}