Skip to content

Commit

Permalink
[update] gemini model inference
Browse files Browse the repository at this point in the history
  • Loading branch information
Immortalise authored Jan 1, 2024
1 parent 935ad6a commit 386cd66
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions promptbench/models/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,8 +523,7 @@ def predict(self, input_text, **kwargs):
generation_config=generation_config,
safety_settings=safety_settings)

try:
response = model.generate_content(input_text).text
except:
response = "error!"
return response

response = model.generate_content(input_text).text

return response

0 comments on commit 386cd66

Please sign in to comment.