mirror of
https://github.com/openai/codex.git
synced 2026-10-19 17:28:46 +00:00
Allow custom Codex instructions for realtime transitions (#36408)
## What changed - Add optional `realtimeStartInstructions` and `realtimeEndInstructions` fields to `thread/realtime/start`. - Apply the instructions when Codex enters and leaves realtime mode, while preserving the existing defaults when either field is omitted. - Limit each field to 8,192 estimated tokens. ## Testing - Cover custom entry and exit instructions across realtime state transitions. - Cover token-limit validation for both fields. GitOrigin-RevId: b9cfa1ff22e084d8a6b2ed56bd27d95ffdd6b6bd
This commit is contained in:
@@ -220,6 +220,10 @@ pub struct ConversationStartParams {
|
||||
pub include_startup_context: bool,
|
||||
/// Complete role-bearing text items to include in the initial realtime session history.
|
||||
pub initial_items: Vec<ConversationTextParams>,
|
||||
/// Developer instructions given to Codex when this realtime session starts.
|
||||
pub realtime_start_instructions: Option<String>,
|
||||
/// Developer instructions given to Codex when this realtime session ends.
|
||||
pub realtime_end_instructions: Option<String>,
|
||||
pub prompt: Option<Option<String>>,
|
||||
pub realtime_session_id: Option<String>,
|
||||
pub transport: Option<ConversationStartTransport>,
|
||||
|
||||
Reference in New Issue
Block a user