Skip to content

Commit

Permalink
fix(streaming): trigger all event handlers with fromReadableStream (#741
Browse files Browse the repository at this point in the history
)
  • Loading branch information
stainless-bot committed Mar 29, 2024
1 parent 540d9ca commit 7b1e593
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/AssistantStream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class AssistantStream
this._connected();
const stream = Stream.fromReadableStream<AssistantStreamEvent>(readableStream, this.controller);
for await (const event of stream) {
this.#handleEvent(event);
this.#addEvent(event);
}
if (stream.controller.signal?.aborted) {
throw new APIUserAbortError();
Expand Down

0 comments on commit 7b1e593

Please sign in to comment.