Kackle commited on
Commit
0a41f01
·
verified ·
1 Parent(s): beeff1d

safety setting 2.5 pro

Browse files
Files changed (1) hide show
  1. gemini_agent.py +8 -4
gemini_agent.py CHANGED
@@ -77,7 +77,8 @@ Provide only the direct answer. If it's a quote, give just the quoted text. If i
77
  generation_config=genai.types.GenerationConfig(
78
  max_output_tokens=50,
79
  temperature=0.0
80
- )
 
81
  )
82
  answer = response.text.strip()
83
 
@@ -145,7 +146,8 @@ Provide only the direct answer. If it's a quote, give just the quoted text. If i
145
  generation_config=genai.types.GenerationConfig(
146
  max_output_tokens=150,
147
  temperature=0.0
148
- )
 
149
  )
150
  answer = response.text.strip()
151
 
@@ -238,7 +240,8 @@ Provide only the direct answer. If it's a quote, give just the quoted text. If i
238
  generation_config=genai.types.GenerationConfig(
239
  max_output_tokens=100,
240
  temperature=0.0
241
- )
 
242
  )
243
  answer = response.text.strip()
244
 
@@ -303,7 +306,8 @@ Provide only the direct answer. If it's a quote, give just the quoted text. If i
303
  generation_config=genai.types.GenerationConfig(
304
  max_output_tokens=100,
305
  temperature=0.0
306
- )
 
307
  )
308
  answer = response.text.strip()
309
 
 
77
  generation_config=genai.types.GenerationConfig(
78
  max_output_tokens=50,
79
  temperature=0.0
80
+ ),
81
+ safety_settings={'HARASSMENT':'block_none', 'HATE_SPEECH':'block_none', 'SEXUALLY_EXPLICIT':'block_none', 'DANGEROUS_CONTENT':'block_none'}
82
  )
83
  answer = response.text.strip()
84
 
 
146
  generation_config=genai.types.GenerationConfig(
147
  max_output_tokens=150,
148
  temperature=0.0
149
+ ),
150
+ safety_settings={'HARASSMENT':'block_none', 'HATE_SPEECH':'block_none', 'SEXUALLY_EXPLICIT':'block_none', 'DANGEROUS_CONTENT':'block_none'}
151
  )
152
  answer = response.text.strip()
153
 
 
240
  generation_config=genai.types.GenerationConfig(
241
  max_output_tokens=100,
242
  temperature=0.0
243
+ ),
244
+ safety_settings={'HARASSMENT':'block_none', 'HATE_SPEECH':'block_none', 'SEXUALLY_EXPLICIT':'block_none', 'DANGEROUS_CONTENT':'block_none'}
245
  )
246
  answer = response.text.strip()
247
 
 
306
  generation_config=genai.types.GenerationConfig(
307
  max_output_tokens=100,
308
  temperature=0.0
309
+ ),
310
+ safety_settings={'HARASSMENT':'block_none', 'HATE_SPEECH':'block_none', 'SEXUALLY_EXPLICIT':'block_none', 'DANGEROUS_CONTENT':'block_none'}
311
  )
312
  answer = response.text.strip()
313