mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' into webpack
This commit is contained in:
@ -3201,7 +3201,8 @@ class StreamingProcessor {
|
||||
}
|
||||
|
||||
onStopStreaming() {
|
||||
this.onErrorStreaming();
|
||||
this.abortController.abort();
|
||||
this.isFinished = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -3246,9 +3247,12 @@ class StreamingProcessor {
|
||||
console.warn(`Stream stats: ${timestamps.length} tokens, ${seconds.toFixed(2)} seconds, rate: ${Number(timestamps.length / seconds).toFixed(2)} TPS`);
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
this.onErrorStreaming();
|
||||
return;
|
||||
// in the case of a self-inflicted abort, we have already cleaned up
|
||||
if (!this.isFinished) {
|
||||
console.error(err);
|
||||
this.onErrorStreaming();
|
||||
}
|
||||
return this.result;
|
||||
}
|
||||
|
||||
this.isFinished = true;
|
||||
@ -4648,7 +4652,6 @@ export function stopGeneration() {
|
||||
let stopped = false;
|
||||
if (streamingProcessor) {
|
||||
streamingProcessor.onStopStreaming();
|
||||
streamingProcessor = null;
|
||||
stopped = true;
|
||||
}
|
||||
if (abortController) {
|
||||
|
Reference in New Issue
Block a user