drainStream
function drainStream(stream, model): Promise<Completion>;Defined in: core/src/turn.ts:150
Drain a stream into a Completion: collectTurn, flattened for a caller
that wants the answer rather than a message to append. model names the
model unless a fallback provider stamped the one that answered.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
stream |
AsyncIterable<ProviderChunk> |
model |
string |
Returns
Section titled “Returns”Promise<Completion>