mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-01 20:06:59 +01:00
Fix authors note position not being considered
This commit is contained in:
parent
41aae57f05
commit
76154fd8ee
@ -561,8 +561,13 @@ function populateChatCompletion (prompts, chatCompletion, {bias, quietPrompt, ty
|
|||||||
// Authors Note
|
// Authors Note
|
||||||
if (prompts.has('authorsNote')) {
|
if (prompts.has('authorsNote')) {
|
||||||
const authorsNote = Message.fromPrompt(prompts.get('authorsNote'));
|
const authorsNote = Message.fromPrompt(prompts.get('authorsNote'));
|
||||||
if (extension_prompt_types.AFTER_SCENARIO) chatCompletion.insert(authorsNote, 'scenario');
|
|
||||||
else chatCompletion.insert(authorsNote, 'main')
|
// ToDo: This should not be retrieved from the ui during runtime
|
||||||
|
const afterScenario = document.querySelector('input[name="extension_floating_position"]').checked;
|
||||||
|
|
||||||
|
// Add authors notes
|
||||||
|
if (true === afterScenario) chatCompletion.insert(authorsNote, 'scenario');
|
||||||
|
else chatCompletion.insert(authorsNote, 'main');
|
||||||
}
|
}
|
||||||
|
|
||||||
// Persona Description
|
// Persona Description
|
||||||
@ -672,7 +677,7 @@ function prepareOpenAIMessages({
|
|||||||
|
|
||||||
// Authors Note
|
// Authors Note
|
||||||
const authorsNote = extensionPrompts['2_floating_prompt'];
|
const authorsNote = extensionPrompts['2_floating_prompt'];
|
||||||
if (authorsNote && authorsNote.content) mappedPrompts.push({role: 'system', content: authorsNote.content, identifier: 'authorsNote'});
|
if (authorsNote && authorsNote.value) mappedPrompts.push({role: 'system', content: authorsNote.value, identifier: 'authorsNote'});
|
||||||
|
|
||||||
// Persona Description
|
// Persona Description
|
||||||
if (power_user.persona_description) {
|
if (power_user.persona_description) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user