aiohttp.json() is unrealiable
This commit is contained in:
parent
14ad558ac6
commit
d73925c6ef
1 changed files with 3 additions and 3 deletions
|
@ -133,11 +133,11 @@ class Gpt(Plugin):
|
||||||
break
|
break
|
||||||
|
|
||||||
try:
|
try:
|
||||||
response_json = await response.json(content_type=None)
|
response_json = json.loads(response_text[count:])
|
||||||
content = response_json['gpt']
|
content = response_json['gpt']
|
||||||
return content
|
return content
|
||||||
except e:
|
except Exception as err:
|
||||||
return e
|
return str(err)
|
||||||
|
|
||||||
@command.new(name="export")
|
@command.new(name="export")
|
||||||
async def export(self, event: MessageEvent) -> None:
|
async def export(self, event: MessageEvent) -> None:
|
||||||
|
|
Loading…
Reference in a new issue