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;

Implements

Constructors

Properties

jobID: string

Accessors

  • get workerName(): undefined | string
  • Name of the worker that processed this request

    Returns undefined | string

Methods