Add safety mode param
This commit is contained in:
@@ -1622,9 +1622,6 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
|||||||
|
|
||||||
//reformat chat
|
//reformat chat
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let body = applyParameters({
|
let body = applyParameters({
|
||||||
message: lastChatPrompt,
|
message: lastChatPrompt,
|
||||||
chat_history: formated.map((v) => {
|
chat_history: formated.map((v) => {
|
||||||
@@ -1657,6 +1654,10 @@ export async function requestChatDataMain(arg:requestDataArgument, model:'model'
|
|||||||
'top_p': 'p',
|
'top_p': 'p',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
if(aiModel !== 'cohere-command-r-03-2024' && aiModel !== 'cohere-command-r-plus-04-2024'){
|
||||||
|
body.safety_mode = "NONE"
|
||||||
|
}
|
||||||
|
|
||||||
if(preamble){
|
if(preamble){
|
||||||
if(body.chat_history.length > 0){
|
if(body.chat_history.length > 0){
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
|
|||||||
Reference in New Issue
Block a user