mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Get appropriate tokenizer for WAI and handle streaming rejection properly
This commit is contained in:
@ -1775,22 +1775,22 @@ class StreamingProcessor {
|
||||
await delay(1); // delay for message to be rendered
|
||||
}
|
||||
|
||||
for await (const text of this.generator()) {
|
||||
if (this.isStopped) {
|
||||
this.onStopStreaming();
|
||||
return;
|
||||
}
|
||||
try {
|
||||
for await (const text of this.generator()) {
|
||||
if (this.isStopped) {
|
||||
this.onStopStreaming();
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
this.result = text;
|
||||
this.onProgressStreaming(this.messageId, message_already_generated + text);
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
this.onErrorStreaming();
|
||||
this.isStopped = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
catch (err) {
|
||||
console.error(err);
|
||||
this.onErrorStreaming();
|
||||
this.isStopped = true;
|
||||
return;
|
||||
}
|
||||
|
||||
this.isFinished = true;
|
||||
@ -6545,7 +6545,7 @@ $(document).ready(function () {
|
||||
if (this_chid !== undefined || selected_group) {
|
||||
// Previously system messages we're allowed to be edited
|
||||
/*const message = $(this).closest(".mes");
|
||||
|
||||
|
||||
if (message.data("isSystem")) {
|
||||
return;
|
||||
}*/
|
||||
|
Reference in New Issue
Block a user