Skip to content

Commit 66bbee9

Browse files
committed
refactor: Add noMultiGen flag to requestChatDataMain function
1 parent 4ad59fa commit 66bbee9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ts/process/request.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ interface requestDataArgument{
3939
useEmotion?:boolean
4040
continue?:boolean
4141
chatId?:string
42+
noMultiGen?:boolean
4243
}
4344

4445
type requestDataResponse = {
@@ -132,6 +133,7 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
132133
arg.continue = arg.continue ?? false
133134
let biasString = arg.biasString ?? []
134135
const aiModel = (model === 'model' || (!db.advancedBotSettings)) ? db.aiModel : db.subModel
136+
const multiGen = (db.genTime > 1 && aiModel.startsWith('gpt') && (!arg.continue)) && (!arg.noMultiGen)
135137

136138
let raiModel = aiModel
137139
if(aiModel === 'reverse_proxy'){
@@ -545,7 +547,6 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
545547
if(risuIdentify){
546548
headers["X-Proxy-Risu"] = 'RisuAI'
547549
}
548-
const multiGen = (db.genTime > 1 && aiModel.startsWith('gpt') && (!arg.continue))
549550
if(multiGen){
550551
// @ts-ignore
551552
body.n = db.genTime

0 commit comments

Comments
 (0)