fix: 修复香蕉2画草图导致生成2张图片问题
- gemini_client: 解析响应时跳过 thought:true 的草稿图,从源头过滤 - 两个香蕉节点的 _images_to_tensor_safe 改为保留最大尺寸图片 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
b4e82fecf7
commit
dafc4cf0f4
@@ -318,10 +318,14 @@ class GeminiAPIClient(BaseAPIClient):
|
||||
inline_data_key = "inlineData"
|
||||
|
||||
if inline_data_key:
|
||||
# 跳过思考链草稿图(thought:true 标记的 inlineData 为模型自检用途,非最终输出)
|
||||
if part.get("thought") is True:
|
||||
continue
|
||||
|
||||
inline_data = part[inline_data_key]
|
||||
# 同样兼容 data/mimeType 的命名
|
||||
img_data = inline_data.get("data") or inline_data.get("data", "")
|
||||
|
||||
|
||||
if img_data:
|
||||
img = decode_base64_to_pil(img_data)
|
||||
images.append(img)
|
||||
|
||||
Reference in New Issue
Block a user