pub struct SessionConfig {Show 13 fields
pub model: Option<String>,
pub input_audio_format: InputAudioFormat,
pub output_audio_format: OutputAudioFormat,
pub instructions: Option<String>,
pub modalities: Vec<RealtimeModality>,
pub voice: Option<RealtimeVoice>,
pub temperature: Option<f64>,
pub max_response_output_tokens: Option<u16>,
pub turn_detection: TurnDetection,
pub input_audio_noise_reduction: Option<InputAudioNoiseReduction>,
pub beta_fields: BetaFields,
pub greeting_config: Option<GreetingConfig>,
pub tools: Vec<RealtimeTool>,
}realtime only.Expand description
The inner session object carried by the session.update client event.
Fields§
§model: Option<String>Model id selected for this session. SessionBuilder
fills this from the type-safe model passed to
RealtimeClient::session.
input_audio_format: InputAudioFormatInput audio format (wav, pcm16, or pcm24).
output_audio_format: OutputAudioFormatOutput audio format. The current protocol accepts only pcm.
instructions: Option<String>System instructions guiding the model.
modalities: Vec<RealtimeModality>Output modalities. The protocol default is text plus audio.
voice: Option<RealtimeVoice>Voice used when audio output is requested.
temperature: Option<f64>Sampling temperature in the inclusive range 0.0..=1.0.
max_response_output_tokens: Option<u16>Maximum number of response text tokens (1..=1024). None uses the
server default ("inf", currently equivalent to 1024).
The upstream schema represents this numeric limit as a JSON string, so
custom serde preserves that exact wire shape while callers use a u16.
turn_detection: TurnDetectionVAD strategy.
input_audio_noise_reduction: Option<InputAudioNoiseReduction>Optional microphone noise-reduction profile.
beta_fields: BetaFieldsBeta / mode toggles.
greeting_config: Option<GreetingConfig>Optional greeting generated when the session starts.
tools: Vec<RealtimeTool>Function tools advertised to the model.
Trait Implementations§
Source§impl Clone for SessionConfig
impl Clone for SessionConfig
Source§fn clone(&self) -> SessionConfig
fn clone(&self) -> SessionConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more