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 asyncio
|
||||
import re
|
||||
import aiohttp
|
||||
|
||||
from PIL import Image
|
||||
from typing import Type, Deque, Dict, Generator
|
||||
|
@ -118,7 +117,7 @@ class Gpt(Plugin):
|
|||
"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:
|
||||
self.log.warning(f"Unexpected status sending request to nexra.aryahcr.cc: {response.status_code}")
|
||||
return
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
maubot: 0.1.0
|
||||
id: sh.boehm.gpt
|
||||
version: 0.0.04
|
||||
version: 0.0.041
|
||||
license: MIT
|
||||
modules:
|
||||
- gpt
|
||||
|
|
Loading…
Reference in a new issue