CFG: Include the entire prompt with negative prompt

CFG with LLMs works differently than stable diffusion. The main principle
is prompt mixing and utilizing the differences between the two prompts
rather than a full "negative prompt" of what the user doesn't want.

SillyTavern its own way of formatting a prompt sent to an LLM backend.
Therefore, take that prompt and add negatives to it.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-08-17 23:51:17 -04:00
parent 3019b889cd
commit cdbca6d9fd
4 changed files with 29 additions and 9 deletions

View File

@ -235,9 +235,7 @@ async function generateTextGenWithStreaming(generate_data, signal) {
}
}
export function getTextGenGenerationData(finalPromt, this_amount_gen, isImpersonate) {
const cfgValues = getCfg();
export function getTextGenGenerationData(finalPromt, this_amount_gen, isImpersonate, cfgValues) {
return {
'prompt': finalPromt,
'max_new_tokens': this_amount_gen,