移除未使用的 multipart 请求包装函数
无选项测试直接调用统一传输入口 避免生产构建保留未使用函数告警
This commit is contained in:
@@ -111,33 +111,6 @@ pub(crate) async fn send_vector_engine_json_request_with_curl(
|
||||
.map_err(VectorEngineCurlError::WorkerJoin)?
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) async fn send_vector_engine_multipart_edit_request_with_curl(
|
||||
request_url: &str,
|
||||
api_key: &str,
|
||||
model: &str,
|
||||
prompt: &str,
|
||||
negative_prompt: Option<&str>,
|
||||
normalized_size: &str,
|
||||
candidate_count: u32,
|
||||
reference_images: &[ReferenceImage],
|
||||
timeout_ms: u64,
|
||||
) -> Result<VectorEngineCurlResponse, VectorEngineCurlError> {
|
||||
send_vector_engine_multipart_edit_request_with_curl_options(
|
||||
request_url,
|
||||
api_key,
|
||||
model,
|
||||
prompt,
|
||||
negative_prompt,
|
||||
normalized_size,
|
||||
candidate_count,
|
||||
reference_images,
|
||||
None,
|
||||
timeout_ms,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub(crate) async fn send_vector_engine_multipart_edit_request_with_curl_options(
|
||||
request_url: &str,
|
||||
@@ -399,7 +372,7 @@ mod tests {
|
||||
#[tokio::test]
|
||||
async fn vector_engine_curl_transport_posts_multipart_request() {
|
||||
let (base_url, server, request_rx) = start_single_response_server().await;
|
||||
let response = send_vector_engine_multipart_edit_request_with_curl(
|
||||
let response = send_vector_engine_multipart_edit_request_with_curl_options(
|
||||
format!("{base_url}/v1/images/edits").as_str(),
|
||||
"test-key",
|
||||
GPT_IMAGE_2_MODEL,
|
||||
@@ -412,6 +385,7 @@ mod tests {
|
||||
mime_type: "image/png".to_string(),
|
||||
file_name: "reference.png".to_string(),
|
||||
}],
|
||||
None,
|
||||
1_000,
|
||||
)
|
||||
.await
|
||||
|
||||
Reference in New Issue
Block a user