Skip to content

Commit

Permalink
update: safety settings
Browse files Browse the repository at this point in the history
  • Loading branch information
zhu327 committed Jan 1, 2024
1 parent f519857 commit cd1ba65
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/adapter/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,19 +324,19 @@ func setGenaiModelByOpenaiRequest(model *genai.GenerativeModel, req *ChatComplet
model.SafetySettings = []*genai.SafetySetting{
{
Category: genai.HarmCategoryHarassment,
Threshold: genai.HarmBlockOnlyHigh,
Threshold: genai.HarmBlockNone,
},
{
Category: genai.HarmCategoryHateSpeech,
Threshold: genai.HarmBlockOnlyHigh,
Threshold: genai.HarmBlockNone,
},
{
Category: genai.HarmCategorySexuallyExplicit,
Threshold: genai.HarmBlockOnlyHigh,
Threshold: genai.HarmBlockNone,
},
{
Category: genai.HarmCategoryDangerousContent,
Threshold: genai.HarmBlockOnlyHigh,
Threshold: genai.HarmBlockNone,
},
}
}

0 comments on commit cd1ba65

Please sign in to comment.