ChatAssistantMessage - Go SDK

ChatAssistantMessage type definition

The Go SDK and docs are currently in beta. Report issues on GitHub.

Assistant message for requests and responses

Fields

FieldTypeRequiredDescriptionExample
Audio*components.ChatAudioOutputAudio output data or reference{"data": "UklGRnoGAABXQVZFZm10IBAAAAABAAEAQB8AAEAfAAABAAgAZGF0YQoGAACBhYqFbF1f","expires_at": 1677652400,"id": "audio_abc123","transcript": "Hello! How can I help you today?"}
Contentoptionalnullable.OptionalNullable[components.ChatAssistantMessageContent]Assistant message content
Images[]components.ChatAssistantImagesGenerated images from image generation models[
{"image_url": {"url": "data:image/png;base64,iVBORw0KGgo..."}
}
]
Name*stringOptional name for the assistant
Reasoningoptionalnullable.OptionalNullable[string]Reasoning output
ReasoningDetails[]components.ReasoningDetailUnionReasoning details for extended thinking models[
{"thinking": "Let me work through this step by step...","type": "thinking"}
]
Refusaloptionalnullable.OptionalNullable[string]Refusal message if content was refused
Rolecomponents.ChatAssistantMessageRole✔️N/A
ToolCalls[]components.ChatToolCallTool calls made by the assistant