mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Stop smooth streaming immediately on abort
This commit is contained in:
@ -3365,7 +3365,7 @@ class StreamingProcessor {
|
|||||||
const timestamps = [];
|
const timestamps = [];
|
||||||
for await (const { text, swipes, logprobs, toolCalls, state } of this.generator()) {
|
for await (const { text, swipes, logprobs, toolCalls, state } of this.generator()) {
|
||||||
timestamps.push(Date.now());
|
timestamps.push(Date.now());
|
||||||
if (this.isStopped) {
|
if (this.isStopped || this.abortController.signal.aborted) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user