feat: 新增首尾帧 K3 自研节点、代理参数重命名、Gemini 客户端优化
- 新增 K3VideoFirstLast 节点(首尾帧 K3 自研):基于 K3Video 去掉分镜,新增可选尾帧输入,尾帧通过 metadata.image_tail 传递 - nano_banana_pro / batch_nano_banana_pro:将参数「代理加速」重命名为「代理端口(如7897)」 - gemini_client:新增 build_proxy_url、_estimate_body_size、_scale_images_to_fit 工具方法 - base_client:小幅优化
This commit is contained in:
@@ -43,6 +43,7 @@ class BaseAPIClient(ABC):
|
||||
self.base_url = base_url
|
||||
self.api_key = api_key
|
||||
self.max_request_size = max_request_size
|
||||
self.proxy_url: Optional[str] = None # 由节点在调用前注入,如 "http://127.0.0.1:7897"
|
||||
|
||||
@abstractmethod
|
||||
def get_endpoint(self, **kwargs) -> str:
|
||||
@@ -200,7 +201,7 @@ class BaseAPIClient(ABC):
|
||||
|
||||
async def _do_request():
|
||||
connect_start = time.time()
|
||||
async with session.post(url, json=request_body, headers=headers, timeout=_aiohttp_timeout) as response:
|
||||
async with session.post(url, json=request_body, headers=headers, timeout=_aiohttp_timeout, proxy=self.proxy_url) as response:
|
||||
connect_time = time.time() - connect_start
|
||||
|
||||
if response.status != 200:
|
||||
|
||||
Reference in New Issue
Block a user