use maubot aiohttp handler
This commit is contained in:
parent
5473df0e5d
commit
cf31e66dd2
2 changed files with 2 additions and 3 deletions
3
dalle.py
3
dalle.py
|
@ -3,7 +3,6 @@ import urllib
|
|||
import io
|
||||
import base64
|
||||
import asyncio
|
||||
import aiohttp
|
||||
import re
|
||||
|
||||
from PIL import Image
|
||||
|
@ -106,7 +105,7 @@ class Dalle(Plugin):
|
|||
"prompt": prompt
|
||||
}
|
||||
|
||||
async with aiohttp.request("POST", "https://nexra.aryahcr.cc/api/image/complements", headers=headers, data=json.dumps(data)) as response:
|
||||
async with self.http.request("POST", "https://nexra.aryahcr.cc/api/image/complements", headers=headers, data=json.dumps(data)) as response:
|
||||
|
||||
if response.status != 200:
|
||||
self.log.warning(f"Unexpected status sending request to nexra.aryahcr.cc: {response.status_code}")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
maubot: 0.1.0
|
||||
id: sh.boehm.dalle
|
||||
version: 0.0.03
|
||||
version: 0.0.031
|
||||
license: MIT
|
||||
modules:
|
||||
- dalle
|
||||
|
|
Loading…
Reference in a new issue