Update GptTalkRu.py

This commit is contained in:
H Lohaus 2024-04-06 23:55:30 +02:00 committed by GitHub
parent 95e61ad79b
commit 5dcbf147b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -48,7 +48,7 @@ class GptTalkRu(AsyncGeneratorProvider):
async with session.post(f"{cls.url}/gpt2", json=data, proxy=proxy) as response:
await raise_for_status(response)
async for chunk in response.content.iter_any():
yield chunk.decode()
yield chunk.decode(errors="ignore")
def encrypt(public_key: str, value: str) -> str:
from Crypto.Cipher import PKCS1_v1_5