Add realtime start instructions config override (#14270)

- add `realtime_start_instructions` config support
- thread it into realtime context updates, schema, docs, and tests
This commit is contained in:
Ahmed Ibrahim
2026-03-10 18:42:05 -07:00
committed by Michael Bolin
parent 31bf1dbe63
commit 39c1bc1c68
7 changed files with 134 additions and 3 deletions

View File

@@ -520,9 +520,12 @@ impl DeveloperInstructions {
}
pub fn realtime_start_message() -> Self {
Self::realtime_start_message_with_instructions(REALTIME_START_INSTRUCTIONS.trim())
}
pub fn realtime_start_message_with_instructions(instructions: &str) -> Self {
DeveloperInstructions::new(format!(
"{REALTIME_CONVERSATION_OPEN_TAG}\n{}\n{REALTIME_CONVERSATION_CLOSE_TAG}",
REALTIME_START_INSTRUCTIONS.trim()
"{REALTIME_CONVERSATION_OPEN_TAG}\n{instructions}\n{REALTIME_CONVERSATION_CLOSE_TAG}"
))
}