feat: add lua edits

This commit is contained in:
kwaroran
2024-06-30 23:09:28 +09:00
parent d5d3c9f423
commit 5ea1f87f53
5 changed files with 129 additions and 10 deletions

View File

@@ -27,6 +27,7 @@ import { addRerolls } from "./prereroll";
import { runImageEmbedding } from "./transformers";
import { hanuraiMemory } from "./memory/hanuraiMemory";
import { hypaMemoryV2 } from "./memory/hypav2";
import { runLuaEditTrigger } from "./lua";
export interface OpenAIChat{
role: 'system'|'user'|'assistant'|'function'
@@ -1046,6 +1047,8 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
data: formated
})
formated = await runLuaEditTrigger(currentChar, 'editRequest', formated)
//token rechecking
let inputTokens = 0