mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-06 04:38:21 +01:00
Allow generate to run without sending a request
This commit is contained in:
parent
e309e18e97
commit
b8d08161ab
@ -2225,7 +2225,7 @@ class StreamingProcessor {
|
||||
}
|
||||
}
|
||||
|
||||
async function Generate(type, { automatic_trigger, force_name2, resolve, reject, quiet_prompt, force_chid, signal } = {}) {
|
||||
async function Generate(type, { automatic_trigger, force_name2, resolve, reject, quiet_prompt, force_chid, signal } = {}, dryRun = false) {
|
||||
//console.log('Generate entered');
|
||||
setGenerationProgress(0);
|
||||
tokens_already_generated = 0;
|
||||
@ -2302,7 +2302,8 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
return;
|
||||
}
|
||||
|
||||
if (online_status != 'no_connection' && this_chid != undefined && this_chid !== 'invalid-safety-id') {
|
||||
if (true === dryRun ||
|
||||
(online_status != 'no_connection' && this_chid != undefined && this_chid !== 'invalid-safety-id')) {
|
||||
let textareaText;
|
||||
if (type !== 'regenerate' && type !== "swipe" && type !== 'quiet' && !isImpersonate) {
|
||||
is_send_press = true;
|
||||
@ -2817,6 +2818,8 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
||||
setInContextMessages(openai_messages_count, type);
|
||||
}
|
||||
|
||||
if (true === dryRun) return onSuccess({error: 'dryRun'});
|
||||
|
||||
if (power_user.console_log_prompts) {
|
||||
|
||||
console.log(generate_data.prompt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user