测试极速成片
This commit is contained in:
@@ -3,6 +3,7 @@ from typing import Any
|
||||
import requests
|
||||
from django.conf import settings
|
||||
|
||||
from .openai_compatible import openai_image_size
|
||||
from .volcano import VolcanoArkProvider
|
||||
|
||||
|
||||
@@ -32,7 +33,7 @@ class YunqiProvider(VolcanoArkProvider):
|
||||
raise ValueError("YUNQI_API_KEY is not configured")
|
||||
if image:
|
||||
raise ValueError("gpt-image-2 via YunQi only supports text-to-image; reference image is not supported")
|
||||
body: dict[str, Any] = {"model": model, "prompt": prompt, "size": size, "n": 1}
|
||||
body: dict[str, Any] = {"model": model, "prompt": prompt, "size": openai_image_size(size), "n": 1}
|
||||
# 实测该网关生图平均延迟 75s+,超时须显著高于火山的 180s
|
||||
response = requests.post(
|
||||
f"{self.base_url.rstrip('/')}/{endpoint.lstrip('/')}",
|
||||
|
||||
Reference in New Issue
Block a user