mirror of
https://github.com/fawney19/Aether.git
synced 2026-09-09 04:30:20 +08:00
fix(formats): ignore Responses ping stream events
This commit is contained in:
@@ -1840,7 +1840,7 @@ impl OpenAIResponsesProviderState {
|
||||
});
|
||||
self.finished = true;
|
||||
}
|
||||
"keepalive" => {}
|
||||
"keepalive" | "ping" => {}
|
||||
event_type if openai_responses_stream_event_is_known_noop(event_type) => {
|
||||
self.ensure_started(report_context, &mut out);
|
||||
}
|
||||
|
||||
@@ -1367,6 +1367,17 @@ mod tests {
|
||||
.expect("keepalive should be ignored");
|
||||
assert!(keepalive.is_empty());
|
||||
|
||||
let ping = matrix
|
||||
.transform_line(
|
||||
&report_context,
|
||||
data_line(json!({
|
||||
"type": "ping",
|
||||
"cost": "0",
|
||||
})),
|
||||
)
|
||||
.expect("provider ping should be ignored");
|
||||
assert!(ping.is_empty());
|
||||
|
||||
for line in [
|
||||
data_line(json!({
|
||||
"type": "response.output_text.delta",
|
||||
|
||||
Reference in New Issue
Block a user