Skip to content

Commit

Permalink
fix(generate): use 2nd part for gemini thinking models
Browse files Browse the repository at this point in the history
  • Loading branch information
terryyz committed Dec 20, 2024
1 parent ba18aaf commit fd3cbc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bigcodebench/provider/google.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ def codegen(
for candidate in ret.candidates:
parts = candidate.content.parts
if parts:
outputs.append(parts[0].text)
if "-thinking-" in self.name:
outputs.append(parts[1].text)
else:
outputs.append(parts[0].text)
else:
print("Empty response!")
outputs.append("")
Expand Down

0 comments on commit fd3cbc8

Please sign in to comment.