Resume Message
Reconnects to an active assistant message stream in a chat.
Usage
Use this endpoint when a client disconnects while an assistant message is still generating, such as after a page refresh. The endpoint reconnects to the currently running stream for the specified assistant message.
This endpoint does not restart a stopped or completed generation. After calling the stop endpoint, start a new message instead of calling resume.
import { v0 } from 'v0-sdk'const stream = await v0.chats.resume({ chatId: 'chat_123', messageId: 'msg_123',})for await (const event of stream) { console.log(event)}API Signature
Request
Path Parameters
The unique identifier of the chat containing the message to resume. Provided as a path parameter.
The identifier of the specific message to resume. Provided as a path parameter.
Response
Returns text/event-stream. Each event is sent as data: <JSON>\n\n.
The chat or message identifier for the event.
The event type. Chat events contain the current chat state; title/name events contain title deltas; message chunk events contain content deltas.
The incremental payload for title/name and message chunk events.
An error message if the stream failed while reconnecting.