Skip to content

Commit a2714bb

Browse files
committed
fix(assistants): handle thread.run.incomplete event
1 parent a7effe8 commit a2714bb

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
@@ -368,6 +368,7 @@ export class AssistantStream
368368
case 'thread.run.in_progress':
369369
case 'thread.run.requires_action':
370370
case 'thread.run.completed':
371+
case 'thread.run.incomplete':
371372
case 'thread.run.failed':
372373
case 'thread.run.cancelling':
373374
case 'thread.run.cancelled':
@@ -398,6 +399,8 @@ export class AssistantStream
398399
throw new Error(
399400
'Encountered an error event in event processing - errors should be processed earlier',
400401
);
402+
default:
403+
assertNever(event);
401404
}
402405
}
403406

@@ -769,3 +772,5 @@ export class AssistantStream
769772
return await this._createToolAssistantStream(runs, runId, params, options);
770773
}
771774
}
775+
776+
function assertNever(_x: never) {}

0 commit comments

Comments
 (0)