Synchronize max depths for plugins

This commit is contained in:
Cohee
2023-09-25 19:29:24 +03:00
parent db71b87309
commit edb79d8c53
5 changed files with 12 additions and 9 deletions

View File

@@ -584,7 +584,7 @@ jQuery(function () {
</label>
<label>
<input type="radio" name="memory_position" value="1" />
In-chat @ Depth <input id="memory_depth" class="text_pole widthUnset" type="number" min="0" max="99" />
In-chat @ Depth <input id="memory_depth" class="text_pole widthUnset" type="number" min="0" max="999" />
</label>
</div>
<div data-source="main" class="memory_contents_controls">

View File

@@ -35,7 +35,7 @@
</label>
<label>
<input type="radio" name="vectors_position" value="1" />
In-chat @ Depth <input id="vectors_depth" class="text_pole widthUnset" type="number" min="0" max="99" />
In-chat @ Depth <input id="vectors_depth" class="text_pole widthUnset" type="number" min="0" max="999" />
</label>
</div>
<div class="flex-container">

View File

@@ -24,6 +24,7 @@ import {
eventSource,
event_types,
substituteParams,
MAX_INJECTION_DEPTH,
} from "../script.js";
import { groups, selected_group } from "./group-chats.js";
@@ -323,7 +324,7 @@ function setOpenAIMessages(chat) {
}
// Add chat injections, 100 = maximum depth of injection. (Why would you ever need more?)
for (let i = 100; i >= 0; i--) {
for (let i = MAX_INJECTION_DEPTH; i >= 0; i--) {
const anchor = getExtensionPrompt(extension_prompt_types.IN_CHAT, i);
if (anchor && anchor.length) {