use maubot aiohttp handler

This commit is contained in:
Philipp 2024-04-08 22:59:16 +02:00
parent d73925c6ef
commit 144d456694
Signed by: Spaenny
GPG Key ID: 9EBD8439AFBAB750
2 changed files with 2 additions and 3 deletions

View File

@ -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

View File

@ -1,6 +1,6 @@
maubot: 0.1.0
id: sh.boehm.gpt
version: 0.0.04
version: 0.0.041
license: MIT
modules:
- gpt