aiohttp.json() is unrealiable

This commit is contained in:
Philipp 2024-04-07 22:44:43 +02:00
parent 14ad558ac6
commit d73925c6ef
Signed by: Philipp
GPG key ID: 9EBD8439AFBAB750

View file

@ -133,11 +133,11 @@ class Gpt(Plugin):
break
try:
response_json = await response.json(content_type=None)
response_json = json.loads(response_text[count:])
content = response_json['gpt']
return content
except e:
return e
except Exception as err:
return str(err)
@command.new(name="export")
async def export(self, event: MessageEvent) -> None: