tonyassi commited on
Commit
83bc280
·
verified ·
1 Parent(s): 0f1a405

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -0
app.py CHANGED
@@ -71,6 +71,24 @@ def chat():
71
  config = types.GenerateContentConfig(
72
  system_instruction=[types.Part.from_text(text=SYSTEM_PROMPT)],
73
  thinking_config=types.ThinkingConfig(thinking_level=THINKING_LEVEL),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
74
  )
75
 
76
  try:
 
71
  config = types.GenerateContentConfig(
72
  system_instruction=[types.Part.from_text(text=SYSTEM_PROMPT)],
73
  thinking_config=types.ThinkingConfig(thinking_level=THINKING_LEVEL),
74
+ safety_settings=[
75
+ types.SafetySetting(
76
+ category=types.HarmCategory.HARM_CATEGORY_HARASSMENT,
77
+ threshold=types.HarmBlockThreshold.OFF,
78
+ ),
79
+ types.SafetySetting(
80
+ category=types.HarmCategory.HARM_CATEGORY_HATE_SPEECH,
81
+ threshold=types.HarmBlockThreshold.OFF,
82
+ ),
83
+ types.SafetySetting(
84
+ category=types.HarmCategory.HARM_CATEGORY_SEXUALLY_EXPLICIT,
85
+ threshold=types.HarmBlockThreshold.OFF,
86
+ ),
87
+ types.SafetySetting(
88
+ category=types.HarmCategory.HARM_CATEGORY_DANGEROUS_CONTENT,
89
+ threshold=types.HarmBlockThreshold.OFF,
90
+ ),
91
+ ],
92
  )
93
 
94
  try: