[feat] add modify request chat

This commit is contained in:
kwaroran
2023-12-02 23:30:52 +09:00
parent fec92d1144
commit 94642b5c66
2 changed files with 13 additions and 5 deletions

View File

@@ -23,6 +23,7 @@ import { getInlayImage, supportsInlayImage } from "../image";
import { getGenerationModelString } from "./models/modelString";
import { sendPeerChar } from "../sync/multiuser";
import { runInlayScreen } from "./inlayScreen";
import { runCharacterJS } from "../plugins/embedscript";
export interface OpenAIChat{
role: 'system'|'user'|'assistant'|'function'
@@ -841,6 +842,12 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
})
}
formated = await runCharacterJS({
code: null,
mode: 'modifyRequestChat',
data: formated
})
{
//token rechecking
let tokens = 0