Fix quiet prompt functionality after rebasing
This commit is contained in:
parent
6e1bb65437
commit
42544e9d26
|
@ -390,13 +390,25 @@ async function prepareOpenAIMessages({ systemPrompt, name2, storyString, worldIn
|
|||
chatCompletion.insertAfter('newMainChat', 'groupNudgeMessage', groupNudgeMessage);
|
||||
}
|
||||
|
||||
// Handle enhanced definitions
|
||||
if (oai_settings.enhance_definitions) chatCompletion.insertAfter('characterInfo', 'enhancedDefinitions', enhanceDefinitionMessage);
|
||||
|
||||
// Handle extension prompt
|
||||
if (extensionPrompt) chatCompletion.insertAfter('worldInfoAfter', 'extensionPrompt', extensionPrompt);
|
||||
|
||||
// Handle bias settings
|
||||
if (bias && bias.trim().length) chatCompletion.add(biasMessage);
|
||||
|
||||
// Handle chat examples
|
||||
const exampleMessages = prepareExampleMessages(openai_msgs ,openai_msgs_example, power_user.pin_examples);
|
||||
if (exampleMessages.length) chatCompletion.replace('dialogueExamples', exampleMessages);
|
||||
|
||||
// Handle quiet prompt
|
||||
if (quietPrompt) {
|
||||
const quietPromptMessage = chatCompletion.makeSystemMessage(quietPrompt);
|
||||
chatCompletion.insertAfter('main', quietPromptMessage)
|
||||
}
|
||||
|
||||
// Handle impersonation
|
||||
if (type === "impersonate") {
|
||||
chatCompletion.insertBefore('chatHistory', 'impersonate', substituteParams(oai_settings.impersonation_prompt));
|
||||
|
@ -415,6 +427,8 @@ async function prepareOpenAIMessages({ systemPrompt, name2, storyString, worldIn
|
|||
console.log("We're sending this:")
|
||||
console.log(openai_msgs_tosend);
|
||||
|
||||
// Integrate const handler_instance = new TokenHandler(countTokens);
|
||||
|
||||
return openai_msgs_tosend;
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue