[fix] group chat formating and notes
This commit is contained in:
@@ -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 = ''
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user