Skip to content

Commit 8f5e7f3

Browse files
fix(assistants): handle thread.run.incomplete while streaming
1 parent 771ae81 commit 8f5e7f3

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/lib/AssistantStream.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,7 @@ export class AssistantStream
719719

720720
#handleRun(this: AssistantStream, event: RunStreamEvent) {
721721
this.#currentRunSnapshot = event.data;
722+
722723
switch (event.event) {
723724
case 'thread.run.created':
724725
break;
@@ -731,6 +732,7 @@ export class AssistantStream
731732
case 'thread.run.failed':
732733
case 'thread.run.completed':
733734
case 'thread.run.expired':
735+
case 'thread.run.incomplete':
734736
this.#finalRun = event.data;
735737
if (this.#currentToolCall) {
736738
this._emit('toolCallDone', this.#currentToolCall);

0 commit comments

Comments
 (0)