[feat] improved nai

This commit is contained in:
kwaroran
2023-09-09 06:40:17 +09:00
parent 15f6443904
commit 2e2b3c2cae
6 changed files with 198 additions and 121 deletions

View File

@@ -529,6 +529,10 @@ export async function sendChat(chatProcessIndex = -1,arg:{chatAdditonalTokens?:n
if(!chat.content){
continue
}
if(!(db.aiModel.startsWith('gpt') || db.aiModel.startsWith('claude') || db.aiModel === 'openrouter' || db.aiModel === 'reverse_proxy')){
formated.push(chat)
continue
}
if(chat.role === 'system'){
const endf = formated.at(-1)
if(endf && endf.role === 'system' && endf.memo === chat.memo && endf.name === chat.name){