use maubot aiohttp handler
This commit is contained in:
parent
d73925c6ef
commit
144d456694
2 changed files with 2 additions and 3 deletions
|
@ -4,7 +4,6 @@ import io
|
||||||
import base64
|
import base64
|
||||||
import asyncio
|
import asyncio
|
||||||
import re
|
import re
|
||||||
import aiohttp
|
|
||||||
|
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
from typing import Type, Deque, Dict, Generator
|
from typing import Type, Deque, Dict, Generator
|
||||||
|
@ -118,7 +117,7 @@ class Gpt(Plugin):
|
||||||
"prompt": prompt
|
"prompt": prompt
|
||||||
}
|
}
|
||||||
|
|
||||||
async with aiohttp.request("POST", "https://nexra.aryahcr.cc/api/chat/gpt", headers=headers, data=json.dumps(data)) as response:
|
async with self.http.request("POST", "https://nexra.aryahcr.cc/api/chat/gpt", headers=headers, data=json.dumps(data)) as response:
|
||||||
if response.status != 200:
|
if response.status != 200:
|
||||||
self.log.warning(f"Unexpected status sending request to nexra.aryahcr.cc: {response.status_code}")
|
self.log.warning(f"Unexpected status sending request to nexra.aryahcr.cc: {response.status_code}")
|
||||||
return
|
return
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
maubot: 0.1.0
|
maubot: 0.1.0
|
||||||
id: sh.boehm.gpt
|
id: sh.boehm.gpt
|
||||||
version: 0.0.04
|
version: 0.0.041
|
||||||
license: MIT
|
license: MIT
|
||||||
modules:
|
modules:
|
||||||
- gpt
|
- gpt
|
||||||
|
|
Loading…
Reference in a new issue