Add igp prompt

This commit is contained in:
kwaroran
2025-03-27 19:13:10 +09:00
parent 294b0e2a52
commit 02401d4d09
4 changed files with 17 additions and 2 deletions

View File

@@ -27,7 +27,7 @@ import { runImageEmbedding } from "./transformers";
import { hanuraiMemory } from "./memory/hanuraiMemory";
import { hypaMemoryV2 } from "./memory/hypav2";
import { runLuaEditTrigger } from "./lua";
import { parseChatML } from "../parser.svelte";
import { getGlobalChatVar, parseChatML } from "../parser.svelte";
import { getModelInfo, LLMFlags } from "../model/modellist";
import { hypaMemoryV3 } from "./memory/hypav3";
import { getModuleAssets } from "./modules";
@@ -1494,6 +1494,18 @@ export async function sendChat(chatProcessIndex = -1,arg:{
})
}
const igp = risuChatParser(DBState.db.igpPrompt ?? "")
if(igp){
const igpFormated = parseChatML(igp)
const rq = await requestChatData({
formated: igpFormated,
bias: {}
},'emotion', abortSignal)
DBState.db.characters[selectedChar].chats[selectedChat].message[DBState.db.characters[selectedChar].chats[selectedChat].message.length - 1].data += rq
}
if(resendChat){
doingChat.set(false)
return await sendChat(chatProcessIndex, {