fix error in exception (#2694)

### What problem does this PR solve?
#2670

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
Kevin Hu 2024-09-30 17:54:27 +08:00 committed by GitHub
parent d6db805885
commit 0a7654c747
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1340,7 +1340,7 @@ class GoogleChat(Base):
+ response["usage"]["output_tokens"],
)
except Exception as e:
return ans + "\n**ERROR**: " + str(e), 0
return "\n**ERROR**: " + str(e), 0
else:
self.client._system_instruction = self.system
if "max_tokens" in gen_conf: