Async iterable that yields chat completion chunks as they arrive.
Usage:
const stream = await sogni.chat.completions.create({ ... stream: true });for await (const chunk of stream) { process.stdout.write(chunk.content);}const result = stream.finalResult; Copy
const stream = await sogni.chat.completions.create({ ... stream: true });for await (const chunk of stream) { process.stdout.write(chunk.content);}const result = stream.finalResult;
Readonly
Accumulated full response content
Actual cost breakdown once stream is complete. Undefined if still streaming.
Final result once stream is complete. Null if still streaming.
Accumulated tool calls from the model. Empty array if no tool calls.
Name of the worker that processed this request
Async iterable that yields chat completion chunks as they arrive.
Usage: