mirror of
https://github.com/openai/codex.git
synced 2026-04-28 18:32:04 +03:00
Use realtime transcript for handoff context (#14132)
- collect input/output transcript deltas into active handoff transcript state - attach and clear that transcript on each handoff, and regenerate schema/tests
This commit is contained in:
@@ -132,7 +132,12 @@ pub struct RealtimeAudioFrame {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, TS)]
|
||||
pub struct RealtimeHandoffMessage {
|
||||
pub struct RealtimeTranscriptDelta {
|
||||
pub delta: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, TS)]
|
||||
pub struct RealtimeTranscriptEntry {
|
||||
pub role: String,
|
||||
pub text: String,
|
||||
}
|
||||
@@ -142,7 +147,7 @@ pub struct RealtimeHandoffRequested {
|
||||
pub handoff_id: String,
|
||||
pub item_id: String,
|
||||
pub input_transcript: String,
|
||||
pub messages: Vec<RealtimeHandoffMessage>,
|
||||
pub active_transcript: Vec<RealtimeTranscriptEntry>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, JsonSchema, TS)]
|
||||
@@ -151,6 +156,8 @@ pub enum RealtimeEvent {
|
||||
session_id: String,
|
||||
instructions: Option<String>,
|
||||
},
|
||||
InputTranscriptDelta(RealtimeTranscriptDelta),
|
||||
OutputTranscriptDelta(RealtimeTranscriptDelta),
|
||||
AudioOut(RealtimeAudioFrame),
|
||||
ConversationItemAdded(Value),
|
||||
ConversationItemDone {
|
||||
|
||||
Reference in New Issue
Block a user