Skip to content

Commit 7032cc4

Browse files
committed
fix(assistants): handle thread.run.incomplete event
1 parent dd776c4 commit 7032cc4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/lib/AssistantStream.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ export class AssistantStream
370370
case 'thread.run.in_progress':
371371
case 'thread.run.requires_action':
372372
case 'thread.run.completed':
373+
case 'thread.run.incomplete':
373374
case 'thread.run.failed':
374375
case 'thread.run.cancelling':
375376
case 'thread.run.cancelled':
@@ -400,6 +401,8 @@ export class AssistantStream
400401
throw new Error(
401402
'Encountered an error event in event processing - errors should be processed earlier',
402403
);
404+
default:
405+
assertNever(event);
403406
}
404407
}
405408

@@ -772,3 +775,5 @@ export class AssistantStream
772775
return await this._createToolAssistantStream(runs, threadId, runId, params, options);
773776
}
774777
}
778+
779+
function assertNever(_x: never) {}

0 commit comments

Comments
 (0)