Skip to main content
POST
Stream Chat
The generated server embeds the latest user message, retrieves relevant chunks, and supplies them to the configured chat model. The response uses a server event stream.

Body

array
required
Conversation messages with a role of user, assistant, or system and a string content.
number
Maximum number of context chunks to retrieve. Defaults to the server’s TOP_K value.

Events

Each SSE frame contains a JSON object in its data field.
Set CHAT_API_KEY and, optionally, CHAT_MODEL in the generated server environment. Custom models that use the OpenAI interface also use CHAT_BASE_URL.