Increase maximum injection depth and WI order (#3800)

This commit is contained in:
Cohee
2025-04-13 21:31:57 +03:00
committed by GitHub
parent 57d30dae59
commit 78bda9954d
6 changed files with 31 additions and 18 deletions

View File

@ -15,12 +15,12 @@ import {
extension_prompt_types,
Generate,
getExtensionPrompt,
getExtensionPromptMaxDepth,
getNextMessageId,
getRequestHeaders,
getStoppingStrings,
is_send_press,
main_api,
MAX_INJECTION_DEPTH,
name1,
name2,
replaceItemizedPromptText,
@ -742,7 +742,8 @@ async function populationInjectionPrompts(prompts, messages) {
'assistant': extension_prompt_roles.ASSISTANT,
};
for (let i = 0; i <= MAX_INJECTION_DEPTH; i++) {
const maxDepth = getExtensionPromptMaxDepth();
for (let i = 0; i <= maxDepth; i++) {
// Get prompts for current depth
const depthPrompts = prompts.filter(prompt => prompt.injection_depth === i && prompt.content);