feat: V2/V2批量节点新增图片质量参数,日常走webp压缩,支持细分耗时统计
- 新增"图片质量"参数(日常/高清),日常时API请求Body携带image_compression=webp - V2批量节点同步该功能,与"图片格式"参数独立共存 - V2节点新增请求耗时/下载耗时/总耗时细分统计 - V2节点本地输出根据图片质量自动做格式转换(日常→JPEG,高清→PNG)
This commit is contained in:
@@ -186,6 +186,7 @@ class GeminiAPIClient(BaseAPIClient):
|
||||
resolution: str = "2K",
|
||||
enable_grounding: bool = False,
|
||||
enable_image_search: bool = False,
|
||||
image_compression: str = None,
|
||||
**kwargs
|
||||
) -> Dict[str, Any]:
|
||||
"""
|
||||
@@ -282,6 +283,10 @@ class GeminiAPIClient(BaseAPIClient):
|
||||
}
|
||||
}
|
||||
|
||||
# 添加图片压缩参数
|
||||
if image_compression:
|
||||
request_body["image_compression"] = image_compression
|
||||
|
||||
# 添加 Google Search Grounding 工具(如果启用)
|
||||
# 注意:enable_image_search=True 时会自动隐含 enable_grounding
|
||||
if enable_grounding or enable_image_search:
|
||||
|
||||
Reference in New Issue
Block a user