明确 GPT 图片编辑响应格式

原始图片编辑请求固定声明 response_format=b64_json。

补充 GPT-Image-2 仅返回 b64_json 的契约行内注释。
This commit is contained in:
2026-09-11 17:29:11 +08:00
parent 48c5638893
commit b357d36262
@@ -136,6 +136,8 @@ pub async fn create_vector_engine_raw_image_edit(
.text("n", "1".to_string())
.text("prompt", prompt.to_string())
.text("size", format!("{}x{}", options.width, options.height))
// GPT-Image-2 的图片编辑响应契约只返回 b64_json,不处理 URL 响应。
.text("response_format", "b64_json".to_string())
.part(
"image",
Part::stream_with_length(image_bytes.clone(), image_bytes.len() as u64)