API
MessageSentParams

MessageSentParams

See introduction on the Messaging page.

content
required
User’s message content.
Type: string | { type: "image_url", image_url: { url: string } } | { type: "text", text: string }


message
required
User’s message object.
Type: object


history
required
Thread history.
Type: array


pushChunk
required
Pass a part of the received text from the chat (suitable if you are receiving the answer in streaming mode).
Will be added to the current message.
Type: (chunk: string) => void


setText
required
Update text message.
Type: (text: string) => void


setStatus
required
Set the waiting status for the assistant’s response.
Type: (status: string) => void


onFinish
required
Assistant’s response is complete.
Type: () => void