Fix joining active inference
This commit is contained in:
@@ -165,9 +165,10 @@ export class Api {
|
||||
* message_deleted per manifest ID that is no longer saved. An
|
||||
* empty manifest requests every saved row.
|
||||
*
|
||||
* When an inference is reserved or ongoing, the stream then follows
|
||||
* its events and ends with done. When none is, the stream ends
|
||||
* after the diff without done.
|
||||
* If an inference run is reserved or in progress, the stream sends one
|
||||
* inference_active event, then the live events of the run, and then done.
|
||||
* If no run is active, the stream closes after the diff and does not send
|
||||
* inference_active or done.
|
||||
*
|
||||
* @param {string} id - conversation ID.
|
||||
* @param {Array<{id: string, updated_at: string}>} manifest
|
||||
@@ -345,7 +346,10 @@ export class Api {
|
||||
body,
|
||||
signal,
|
||||
});
|
||||
yield* readEvents(res);
|
||||
for await (const event of readEvents(res)) {
|
||||
if (signal?.aborted) return;
|
||||
yield event;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user