Interface StreamChunk<TOutput>

Chunk of data emitted during streaming execution

interface StreamChunk<TOutput> {
    data: Partial<TOutput>;
    done: boolean;
    metadata?: { tokens?: number; timestamp?: Date; [key: string]: unknown };
}

Type Parameters

  • TOutput

    The type of the complete output

Properties

Properties

data: Partial<TOutput>

Partial data for this chunk

done: boolean

Whether this is the final chunk

metadata?: { tokens?: number; timestamp?: Date; [key: string]: unknown }

Optional metadata for this chunk (tokens, timing, etc.)