feat: add sync image heartbeat toggle

This commit is contained in:
Entropy.Xu
2026-05-10 12:40:52 +08:00
parent 0f42a6ed82
commit 5268f62a64
6 changed files with 520 additions and 13 deletions

View File

@@ -899,6 +899,12 @@ fn build_json_whitespace_heartbeat_stream(
}
}
pub(crate) fn build_openai_image_sync_json_whitespace_heartbeat_stream(
rx: mpsc::Receiver<Result<Bytes, IoError>>,
) -> impl futures_util::Stream<Item = Result<Bytes, IoError>> + Send + 'static {
build_json_whitespace_heartbeat_stream(rx, OPENAI_IMAGE_SYNC_JSON_HEARTBEAT_INTERVAL, None)
}
async fn openai_image_sync_json_heartbeat_final_bytes(
result: Result<Option<Response<Body>>, GatewayError>,
) -> Vec<u8> {

View File

@@ -1,6 +1,8 @@
mod execution;
pub(crate) use execution::execute_execution_runtime_sync;
pub(crate) use execution::{
build_openai_image_sync_json_whitespace_heartbeat_stream, execute_execution_runtime_sync,
};
#[allow(unused_imports)]
pub(crate) use execution::{