[fix] group chat formating and notes

This commit is contained in:
kwaroran
2023-05-24 20:06:14 +09:00
parent 80f11b7e03
commit 1dff7b8149
3 changed files with 10 additions and 5 deletions

View File

@@ -327,7 +327,8 @@ export async function sendChat(chatProcessIndex = -1):Promise<boolean> {
formated: formated,
bias: bias,
currentChar: currentChar,
useStreaming: true
useStreaming: true,
isGroupChat: nowChatroom.type === 'group'
}, 'model')
let result = ''

View File

@@ -17,6 +17,7 @@ interface requestDataArgument{
PresensePenalty?: number
frequencyPenalty?: number,
useStreaming?:boolean
isGroupChat?:boolean
}
type requestDataResponse = {
@@ -57,6 +58,9 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
case 'gpt4':{
for(let i=0;i<formated.length;i++){
if(arg.isGroupChat){
formated[i].content = formated[i].name + ": " + formated[i].content
}
formated[i].name = undefined
}