mirror of
https://github.com/openai/codex.git
synced 2026-04-24 06:35:50 +00:00
Fix app-server realtime CI expectation
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -480,52 +480,7 @@ async fn realtime_webrtc_start_emits_sdp_notification() -> Result<()> {
|
||||
assert_eq!(request.url.path(), "/v1/realtime/calls");
|
||||
assert_eq!(request.url.query(), None);
|
||||
let body = String::from_utf8(request.body).context("multipart body should be utf-8")?;
|
||||
let session = json!({
|
||||
"type": "realtime",
|
||||
"instructions": "backend prompt\n\nstartup context",
|
||||
"output_modalities": ["audio"],
|
||||
"audio": {
|
||||
"input": {
|
||||
"format": {
|
||||
"type": "audio/pcm",
|
||||
"rate": 24_000,
|
||||
},
|
||||
"noise_reduction": {
|
||||
"type": "near_field",
|
||||
},
|
||||
"turn_detection": {
|
||||
"type": "server_vad",
|
||||
"interrupt_response": true,
|
||||
"create_response": true,
|
||||
},
|
||||
},
|
||||
"output": {
|
||||
"format": {
|
||||
"type": "audio/pcm",
|
||||
"rate": 24_000,
|
||||
},
|
||||
"voice": "marin",
|
||||
},
|
||||
},
|
||||
"tools": [{
|
||||
"type": "function",
|
||||
"name": "codex",
|
||||
"description": "Delegate a request to Codex and return the final result to the user. Use this as the default action. If the user asks to do something next, later, after this, or once current work finishes, call this tool so the work is actually queued instead of merely promising to do it later.",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"prompt": {
|
||||
"type": "string",
|
||||
"description": "The user request to delegate to Codex.",
|
||||
},
|
||||
},
|
||||
"required": ["prompt"],
|
||||
"additionalProperties": false,
|
||||
},
|
||||
}],
|
||||
"tool_choice": "auto",
|
||||
})
|
||||
.to_string();
|
||||
let session = r#"{"tool_choice":"auto","type":"realtime","instructions":"backend prompt\n\nstartup context","output_modalities":["audio"],"audio":{"input":{"format":{"type":"audio/pcm","rate":24000},"noise_reduction":{"type":"near_field"},"turn_detection":{"type":"server_vad","interrupt_response":true,"create_response":true}},"output":{"format":{"type":"audio/pcm","rate":24000},"voice":"marin"}},"tools":[{"type":"function","name":"codex","description":"Delegate a request to Codex and return the final result to the user. Use this as the default action. If the user asks to do something next, later, after this, or once current work finishes, call this tool so the work is actually queued instead of merely promising to do it later.","parameters":{"type":"object","properties":{"prompt":{"type":"string","description":"The user request to delegate to Codex."}},"required":["prompt"],"additionalProperties":false}}]}"#;
|
||||
assert_eq!(
|
||||
body,
|
||||
format!(
|
||||
|
||||
Reference in New Issue
Block a user