Image info, endpoint encryption

This commit is contained in:
BarsTiger
2023-02-24 23:41:29 +02:00
parent 846e65e2ce
commit 8f0cd0ac05
19 changed files with 211 additions and 23 deletions

View File

@@ -1,12 +1,12 @@
import aiohttp
from bot.db import db, DBTables
from bot.db import db, DBTables, decrypt
from .objects.prompt_request import Prompt
import json
import base64
async def txt2img(prompt: Prompt, ignore_exceptions: bool = False) -> list[bytes, dict] | None:
endpoint = db[DBTables.config].get('endpoint')
endpoint = decrypt(db[DBTables.config].get('endpoint'))
try:
async with aiohttp.ClientSession() as session:
r = await session.post(