@4396openwebui 使用硅基flux画图 中发帖

函数 
import asyncio
import random
import re
from typing import Callable, Awaitable, Any, Optional

import aiohttp
from pydantic import BaseModel, Field

class AIOutput(BaseModel):
success: bool
prompt: str
width: int
height: int
reason: Optional[str] = None
seed: int = Field(default=-1)

class Filter:
# 使用您提供的正则表达式,转换为 Python 格式
JSON_REGEX = re.compile(r"\{(?:\\.|[^\...