Update GeminiProChat.py

This commit is contained in:
H Lohaus 2024-04-06 23:52:31 +02:00 committed by GitHub
parent c85765925f
commit 8894160f42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -55,7 +55,7 @@ class GeminiProChat(AsyncGeneratorProvider):
raise RateLimitError(f"Response {response.status}: Rate limit reached")
await raise_for_status(response)
async for chunk in response.content.iter_any():
yield chunk.decode()
yield chunk.decode(errors="ignore")
def generate_signature(time: int, text: str, secret: str = ""):
message = f'{time}:{text}:{secret}';