mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-03 01:40:21 +08:00
fix: align image generation checks
This commit is contained in:
@@ -1191,10 +1191,10 @@ mod tests {
|
||||
use serde_json::json;
|
||||
|
||||
use super::{
|
||||
build_chatgpt_web_image_request_body, build_openai_image_provider_request_body,
|
||||
is_openai_image_stream_request, normalize_openai_image_request,
|
||||
normalize_openai_image_request_with_options, openai_image_operation_from_path,
|
||||
OpenAiImageNormalizeOptions, OpenAiImageOperation,
|
||||
build_chatgpt_web_image_request_body, build_openai_image_api_provider_request_body,
|
||||
build_openai_image_provider_request_body, is_openai_image_stream_request,
|
||||
normalize_openai_image_request, normalize_openai_image_request_with_options,
|
||||
openai_image_operation_from_path, OpenAiImageNormalizeOptions, OpenAiImageOperation,
|
||||
};
|
||||
use crate::formats::openai::image::spec::{resolve_stream_spec, resolve_sync_spec};
|
||||
use crate::formats::openai::responses::codex::{
|
||||
|
||||
@@ -356,6 +356,7 @@ pub fn build_openai_chat_usage_chunk(
|
||||
)
|
||||
}
|
||||
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
pub fn build_openai_chat_usage_chunk_with_cache(
|
||||
id: &str,
|
||||
model: &str,
|
||||
|
||||
@@ -1338,13 +1338,14 @@ mod tests {
|
||||
let output = utf8(outcome.sse_body);
|
||||
assert!(output.contains("event: message_start"));
|
||||
assert!(output.contains("event: message_stop"));
|
||||
assert!(output.contains("\"stop_reason\":\"end_turn\""));
|
||||
assert!(!output.contains("status_code"));
|
||||
assert_eq!(
|
||||
outcome
|
||||
.terminal_summary
|
||||
.as_ref()
|
||||
.and_then(|summary| summary.finish_reason.as_deref()),
|
||||
Some("end_turn")
|
||||
Some("stop")
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user