fix: cohere SafetyMode

This commit is contained in:
CalciumIon committed 2024-09-11 19:12:32 +08:00
1 parent 89713975ca
commit f50cf75d1a
2 files changed
+4 -2

No files matched your search

+3 -1
View File
@@ -22,7 +22,9 @@ func requestOpenAI2Cohere(textRequest dto.GeneralOpenAIRequest) *CohereRequest {
Message: "",
Stream: textRequest.Stream,
MaxTokens: textRequest.GetMaxTokens(),
SafetyMode: common.CohereSafetySetting,
}
if common.CohereSafetySetting != "NONE" {
cohereReq.SafetyMode = common.CohereSafetySetting
}
if cohereReq.MaxTokens == 0 {
cohereReq.MaxTokens = 4000