airworkx commited on
Commit
5150311
1 Parent(s): 21c0f8f

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +27 -2
utils.py CHANGED
@@ -1,3 +1,28 @@
1
- from google.generativeai import SafetySettings
2
 
3
- SAFETY_SETTINGS = SafetySettings()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """https://ai.google.dev/api/rest/v1beta/HarmCategory"""
2
 
3
+ SAFETY_SETTINGS = [
4
+ {
5
+ "category": "HARM_CATEGORY_SEXUAL",
6
+ "threshold": "ALLOW",
7
+ },
8
+ {
9
+ "category": "HARM_CATEGORY_DANGEROUS",
10
+ "threshold": "ALLOW",
11
+ },
12
+ {
13
+ "category": "HARM_CATEGORY_HARASSMENT",
14
+ "threshold": "ALLOW",
15
+ },
16
+ {
17
+ "category": "HARM_CATEGORY_HATE_SPEECH",
18
+ "threshold": "ALLOW",
19
+ },
20
+ {
21
+ "category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
22
+ "threshold": "ALLOW",
23
+ },
24
+ {
25
+ "category": "HARM_CATEGORY_DANGEROUS_CONTENT",
26
+ "threshold": "ALLOW",
27
+ },
28
+ ]