mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Create a deep copy of prompt defaults on char select
Along other minor fixes and optimizations
This commit is contained in:
@ -454,7 +454,7 @@ function populateDialogueExamples(prompts, chatCompletion) {
|
||||
/**
|
||||
* Populate a chat conversation by adding prompts to the conversation and managing system and user prompts.
|
||||
*
|
||||
* @param {Map} prompts - Map object containing all prompts where the key is the prompt identifier and the value is the prompt object.
|
||||
* @param {PromptCollection} prompts - PromptCollection containing all prompts where the key is the prompt identifier and the value is the prompt object.
|
||||
* @param {ChatCompletion} chatCompletion - An instance of ChatCompletion class that will be populated with the prompts.
|
||||
* @param {Object} options - An object with optional settings.
|
||||
* @param {string} options.bias - A bias to be added in the conversation.
|
||||
@ -496,7 +496,7 @@ function populateChatCompletion (prompts, chatCompletion, {bias, quietPrompt, ty
|
||||
[...systemPrompts, ...userPrompts].forEach(identifier => addToChatCompletion(identifier));
|
||||
|
||||
// Add enhance definition instruction
|
||||
if (prompts.has('scenario')) addToChatCompletion('enhanceDefinitions');
|
||||
if (prompts.has('enhanceDefinitions')) addToChatCompletion('enhanceDefinitions');
|
||||
|
||||
// Insert nsfw avoidance prompt into main, if no nsfw prompt is present
|
||||
if (false === chatCompletion.has('nsfw') && oai_settings.nsfw_avoidance_prompt)
|
||||
|
Reference in New Issue
Block a user