Example
Request
What You Receive
Each item is aCell snapshot. Cells are
re-sent as they evolve — upsert by cell.id.
To stop the run itself (not just your stream), call
client.chats.cancelStream.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Run-scoped cell firehose that ends when the run does.
streaming.chats.streamChat(request, options?) → AsyncIterable<Cell>
import { Textql } from "@textql/sdk";
import { createStreamingClient } from "@textql/sdk/streaming";
const client = new Textql({ apiKey, serverURL: "https://app.textql.com/rpc/public" });
const streaming = createStreamingClient({ apiKey });
const sent = await client.chats.send({ body: { chatId, message: "..." } });
for await (const cell of streaming.chats.streamChat({
chatId,
latestCompleteCellId: sent.cellId,
})) {
render(cell); // typed Cell — loop exits when the run completes
}
| Field | Type | Notes |
|---|---|---|
chatId | string | required |
latestCompleteCellId | string? | stream cells produced after this one (typically the cellId returned by send) |
model | LlmModel? | override the chat’s model for this run |
fastMode | boolean? | |
maxThinking | boolean? | |
research | boolean? |
Cell snapshot. Cells are
re-sent as they evolve — upsert by cell.id.
To stop the run itself (not just your stream), call
client.chats.cancelStream.