Merge branch 'staging' into instruct-rework

This commit is contained in:
Cohee 2024-03-28 20:22:52 +02:00
commit c4427349c9
2 changed files with 6 additions and 9 deletions

View File

@ -2733,9 +2733,7 @@ class StreamingProcessor {
const continueMsg = this.type === 'continue' ? this.messageAlreadyGenerated : undefined; const continueMsg = this.type === 'continue' ? this.messageAlreadyGenerated : undefined;
saveLogprobsForActiveMessage(this.messageLogprobs.filter(Boolean), continueMsg); saveLogprobsForActiveMessage(this.messageLogprobs.filter(Boolean), continueMsg);
await saveChatConditional(); await saveChatConditional();
activateSendButtons(); unblockGeneration();
showSwipeButtons();
setGenerationProgress(0);
generatedPromptCache = ''; generatedPromptCache = '';
//console.log("Generated text size:", text.length, text) //console.log("Generated text size:", text.length, text)
@ -2778,11 +2776,8 @@ class StreamingProcessor {
this.isStopped = true; this.isStopped = true;
this.hideMessageButtons(this.messageId); this.hideMessageButtons(this.messageId);
$('#send_textarea').removeAttr('disabled'); generatedPromptCache = '';
is_send_press = false; unblockGeneration();
activateSendButtons();
setGenerationProgress(0);
showSwipeButtons();
} }
setFirstSwipe(messageId) { setFirstSwipe(messageId) {
@ -4042,6 +4037,8 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu
toastr.error(exception.error.message, 'Error', { timeOut: 10000, extendedTimeOut: 20000 }); toastr.error(exception.error.message, 'Error', { timeOut: 10000, extendedTimeOut: 20000 });
} }
generatedPromptCache = '';
unblockGeneration(); unblockGeneration();
console.log(exception); console.log(exception);
streamingProcessor = null; streamingProcessor = null;

View File

@ -33,7 +33,7 @@
<li><tt>&lcub;&lcub;time_UTC±#&rcub;&rcub;</tt> the current time in the specified UTC time zone offset, e.g. UTC-4 or UTC+2</li> <li><tt>&lcub;&lcub;time_UTC±#&rcub;&rcub;</tt> the current time in the specified UTC time zone offset, e.g. UTC-4 or UTC+2</li>
<li><tt>&lcub;&lcub;idle_duration&rcub;&rcub;</tt> the time since the last user message was sent</li> <li><tt>&lcub;&lcub;idle_duration&rcub;&rcub;</tt> the time since the last user message was sent</li>
<li><tt>&lcub;&lcub;bias "text here"&rcub;&rcub;</tt> sets a behavioral bias for the AI until the next user input. Quotes around the text are important.</li> <li><tt>&lcub;&lcub;bias "text here"&rcub;&rcub;</tt> sets a behavioral bias for the AI until the next user input. Quotes around the text are important.</li>
<li><tt>&lcub;&lcub;roll:(formula)&rcub;&rcub;</tt> rolls a dice. (ex: <tt>>&lcub;&lcub;roll:1d6&rcub;&rcub</tt> will roll a 6-sided dice and return a number between 1 and 6)</li> <li><tt>&lcub;&lcub;roll:(formula)&rcub;&rcub;</tt> rolls a dice. (ex: <tt>>&lcub;&lcub;roll:1d6&rcub;&rcub;</tt> will roll a 6-sided dice and return a number between 1 and 6)</li>
<li><tt>&lcub;&lcub;random:(args)&rcub;&rcub;</tt> returns a random item from the list. (ex: <tt>&lcub;&lcub;random:1,2,3,4&rcub;&rcub;</tt> will return 1 of the 4 numbers at random. Works with text lists too.</li> <li><tt>&lcub;&lcub;random:(args)&rcub;&rcub;</tt> returns a random item from the list. (ex: <tt>&lcub;&lcub;random:1,2,3,4&rcub;&rcub;</tt> will return 1 of the 4 numbers at random. Works with text lists too.</li>
<li><tt>&lcub;&lcub;random::(arg1)::(arg2)&rcub;&rcub;</tt> alternative syntax for random that allows to use commas in the list items.</li> <li><tt>&lcub;&lcub;random::(arg1)::(arg2)&rcub;&rcub;</tt> alternative syntax for random that allows to use commas in the list items.</li>
<li><tt>&lcub;&lcub;banned "text here"&rcub;&rcub;</tt> dynamically add text in the quotes to banned words sequences, if Text Generation WebUI backend used. Do nothing for others backends. Can be used anywhere (Character description, WI, AN, etc.) Quotes around the text are important.</li> <li><tt>&lcub;&lcub;banned "text here"&rcub;&rcub;</tt> dynamically add text in the quotes to banned words sequences, if Text Generation WebUI backend used. Do nothing for others backends. Can be used anywhere (Character description, WI, AN, etc.) Quotes around the text are important.</li>