pub struct SessionResource {
pub model: Option<String>,
pub modalities: Option<Vec<String>>,
pub instructions: Option<String>,
pub voice: Option<RealtimeVoice>,
pub input_audio_format: Option<AudioFormat>,
pub output_audio_format: Option<AudioFormat>,
pub input_audio_transcription: Option<AudioTranscription>,
pub turn_detection: Option<TurnDetection>,
pub tools: Option<Vec<ToolDefinition>>,
pub tool_choice: Option<ToolChoice>,
pub temperature: Option<f32>,
pub max_response_output_tokens: Option<MaxResponseOutputTokens>,
}realtime only.Fields§
§model: Option<String>The default model used for this session.
modalities: Option<Vec<String>>The set of modalities the model can respond with. To disable audio, set this to [“text”].
instructions: Option<String>§voice: Option<RealtimeVoice>The voice the model uses to respond. Cannot be changed once the model has responded with audio at least once.
input_audio_format: Option<AudioFormat>The format of input audio. Options are “pcm16”, “g711_ulaw”, or “g711_alaw”.
output_audio_format: Option<AudioFormat>The format of output audio. Options are “pcm16”, “g711_ulaw”, or “g711_alaw”.
input_audio_transcription: Option<AudioTranscription>Configuration for input audio transcription. Can be set to null to turn off.
turn_detection: Option<TurnDetection>Configuration for turn detection. Can be set to null to turn off.
tools: Option<Vec<ToolDefinition>>Tools (functions) available to the model.
tool_choice: Option<ToolChoice>How the model chooses tools.
temperature: Option<f32>Sampling temperature for the model.
max_response_output_tokens: Option<MaxResponseOutputTokens>Maximum number of output tokens for a single assistant response, inclusive of tool calls. Provide an integer between 1 and 4096 to limit output tokens, or “inf” for the maximum available tokens for a given model. Defaults to “inf”.
Trait Implementations§
Source§impl Clone for SessionResource
impl Clone for SessionResource
Source§fn clone(&self) -> SessionResource
fn clone(&self) -> SessionResource
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more