Remove unnecessary delays in the prompt builder.

This is no longer needed since the async token counter won't block the UI thread during the request preparation.
This commit is contained in:
Cohee 2024-04-19 02:08:18 +03:00
parent 2333fe64d0
commit 794786da43
1 changed files with 0 additions and 7 deletions

View File

@ -3521,9 +3521,6 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
} else {
break;
}
// Prevent UI thread lock on tokenization
await delay(1);
}
for (let i = 0; i < chat2.length; i++) {
@ -3551,9 +3548,6 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
} else {
break;
}
// Prevent UI thread lock on tokenization
await delay(1);
}
// Add user alignment message if last message is not a user message
@ -3596,7 +3590,6 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
} else {
break;
}
await delay(1);
}
}