mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Stabilize extension injections order for prompt manager
This commit is contained in:
@ -294,11 +294,11 @@ function setOpenAIMessages(chat) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add chat injections, 100 = maximum depth of injection. (Why would you ever need more?)
|
// Add chat injections, 100 = maximum depth of injection. (Why would you ever need more?)
|
||||||
for (let i = 0; i < 100; i++) {
|
for (let i = 100; i >= 0; i--) {
|
||||||
const anchor = getExtensionPrompt(extension_prompt_types.IN_CHAT, i);
|
const anchor = getExtensionPrompt(extension_prompt_types.IN_CHAT, i);
|
||||||
|
|
||||||
if (anchor && anchor.length) {
|
if (anchor && anchor.length) {
|
||||||
openai_msgs.splice(i, 0, { "role": 'system', 'content': anchor.trim() })
|
openai_msgs.splice(i, 0, { "role": 'system', 'content': anchor.trim() });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user