[fix] seed

This commit is contained in:
kwaroran
2023-11-08 16:35:32 +09:00
parent 406c2fc3c1
commit cd322a5b1f

View File

@@ -206,12 +206,11 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
frequency_penalty: arg.frequencyPenalty || (db.frequencyPenalty / 100),
logit_bias: bias,
stream: false,
seed: db.generationSeed || -1
})
body.seed = db.generationSeed
if(body.seed === -1 || (!body.seed) || (body.seed < 0)){
delete body.seed
if(db.generationSeed > 0){
// @ts-ignore
body.seed = db.generationSeed
}
let replacerURL = aiModel === 'openrouter' ? "https://openrouter.ai/api/v1/chat/completions" :