mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-09 08:30:13 +01:00
Fix error on streaming if the processor was already destroyed
This commit is contained in:
parent
db04fff3df
commit
8c095f204a
@ -4420,7 +4420,7 @@ export async function Generate(type, { automatic_trigger, force_name2, quiet_pro
|
||||
const invocationResult = await ToolManager.invokeFunctionTools(streamingProcessor.toolCalls);
|
||||
if (invocationResult.hadToolCalls) {
|
||||
const lastMessage = chat[chat.length - 1];
|
||||
const shouldDeleteMessage = ['', '...'].includes(lastMessage?.mes) && ['', '...'].includes(streamingProcessor.result);
|
||||
const shouldDeleteMessage = ['', '...'].includes(lastMessage?.mes) && ['', '...'].includes(streamingProcessor?.result);
|
||||
shouldDeleteMessage && await deleteLastMessage();
|
||||
if (!invocationResult.invocations.length && shouldDeleteMessage) {
|
||||
ToolManager.showToolCallError(invocationResult.errors);
|
||||
|
Loading…
x
Reference in New Issue
Block a user