为 Raw 编辑建立独立字节类型
恢复旧图片链路的 Vec 字节契约 让新增 raw_edit 输入和结果类型独立于既有 ReferenceImage
This commit is contained in:
@@ -154,6 +154,8 @@ pub async fn create_vector_engine_raw_image_edit(
|
||||
.text("prompt", prompt.to_string())
|
||||
.text("size", format!("{}x{}", options.width, options.height))
|
||||
// GPT-Image-2 原生只返回 b64_json;不要添加 URL 下载或 response_format 兼容分支。
|
||||
// `Part::bytes` 只接受 `Cow<[u8]>`,会迫使 `Bytes` 复制成 `Vec`;stream Body
|
||||
// 直接接管共享缓冲,避免 raw_edit 请求的整图/掩码额外分配和峰值内存。
|
||||
.part(
|
||||
"image",
|
||||
Part::stream(reqwest::Body::from(image_bytes))
|
||||
|
||||
Reference in New Issue
Block a user