mirror of
https://github.com/openai/codex.git
synced 2026-04-29 17:06:51 +00:00
Support response.done and add integration tests (#9129)
The agent loop using a persistent incremental web socket connection.
This commit is contained in:
@@ -319,6 +319,15 @@ pub fn ev_completed(id: &str) -> Value {
|
||||
})
|
||||
}
|
||||
|
||||
pub fn ev_done() -> Value {
|
||||
serde_json::json!({
|
||||
"type": "response.done",
|
||||
"response": {
|
||||
"usage": {"input_tokens":0,"input_tokens_details":null,"output_tokens":0,"output_tokens_details":null,"total_tokens":0}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
/// Convenience: SSE event for a created response with a specific id.
|
||||
pub fn ev_response_created(id: &str) -> Value {
|
||||
serde_json::json!({
|
||||
|
||||
Reference in New Issue
Block a user