Open History to see the last commit
Class: BatchStrategy#
Defined in: activities/chat/stream/strategies.ts:34
Batch Strategy - emit every N chunks Useful for reducing UI update frequency
Implements#
Constructors#
Constructor#
new BatchStrategy(batchSize): BatchStrategy;
Defined in: activities/chat/stream/strategies.ts:37
Parameters#
batchSize#
number = 5
Returns#
BatchStrategy
Methods#
reset()#
reset(): void;
Defined in: activities/chat/stream/strategies.ts:48
Optional: Reset strategy state (called when streaming starts)
Returns#
void
Implementation of#
shouldEmit()#
shouldEmit(_chunk, _accumulated): boolean;
Defined in: activities/chat/stream/strategies.ts:39
Called for each text chunk received
Parameters#
_chunk#
string
_accumulated#
string
Returns#
boolean
true if an update should be emitted now