Update utils.py
Browse files
utils.py
CHANGED
@@ -1,3 +1,28 @@
|
|
1 |
-
|
2 |
|
3 |
-
SAFETY_SETTINGS =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
]
|