Skip to main content

Interface: IUiChatRequestBody

Defined in: entries/vercel-ui/types.ts:81

The body useChat's default transport posts, plus what this module reads from the request's body.

Parsed by AIGatewayVercelUi.chat; handed to IAIGatewayVercelUiConfig.prepareCall.

Properties​

id​

id: string

Defined in: entries/vercel-ui/types.ts:83

The client's own chat id; not the thread id.


messageId?​

optional messageId?: string

Defined in: entries/vercel-ui/types.ts:89

The message a regenerate would target; carried as the SDK sends it, not read.


messages​

messages: TGatewayUiMessage[]

Defined in: entries/vercel-ui/types.ts:85

The client's messages; the module reads the last one only.


threadId?​

optional threadId?: string

Defined in: entries/vercel-ui/types.ts:91

The thread of the chat; absent on its first message (the stream's metadata then names the created thread).


trigger​

trigger: "submit-message" | "regenerate-message"

Defined in: entries/vercel-ui/types.ts:87

The SDK's trigger; a regenerate is refused with a 400, so a parsed body always says "submit-message".