Add safety mode param

This commit is contained in:
kwaroran
2024-09-09 03:48:41 +09:00
parent 614087ae97
commit db39b64841

View File

@@ -1622,9 +1622,6 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
//reformat chat
let body = applyParameters({
message: lastChatPrompt,
chat_history: formated.map((v) => {
@@ -1657,6 +1654,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
'top_p': 'p',
})
if(aiModel !== 'cohere-command-r-03-2024' && aiModel !== 'cohere-command-r-plus-04-2024'){
body.safety_mode = "NONE"
}
if(preamble){
if(body.chat_history.length > 0){
// @ts-ignore