|
|
@@ -23,6 +23,9 @@ func requestOpenAI2Cohere(textRequest dto.GeneralOpenAIRequest) *CohereRequest {
|
|
|
Stream: textRequest.Stream,
|
|
|
MaxTokens: textRequest.GetMaxTokens(),
|
|
|
}
|
|
|
+ if common.CohereSafetySetting != "NONE" {
|
|
|
+ cohereReq.SafetyMode = common.CohereSafetySetting
|
|
|
+ }
|
|
|
if cohereReq.MaxTokens == 0 {
|
|
|
cohereReq.MaxTokens = 4000
|
|
|
}
|
|
|
@@ -44,6 +47,7 @@ func requestOpenAI2Cohere(textRequest dto.GeneralOpenAIRequest) *CohereRequest {
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
return &cohereReq
|
|
|
}
|
|
|
|