Realtime Config • Rust AI Agent SDK
RealtimeConfig: Configuration for realtime voice settings.
RealtimeConfig
Defined in the agents module.
Rust AI Agent SDK
Configuration for realtime voice settings.
Fields
| Name | Type | Description |
|---|---|---|
voice | String | Voice for audio output |
modalities | Vec<String> | Modalities (text, audio) |
turn_detection | String | Turn detection mode |
input_audio_format | String | Input audio format |
output_audio_format | String | Output audio format |
temperature | f32 | Temperature |
max_response_output_tokens | Option<usize> | Max response tokens |
instructions | Option<String> | System instructions |
Methods
new
fn new() -> SelfCreate a new config
voice
fn voice(mut self, voice: impl Into<String>) -> SelfSet voice
Parameters:
| Name | Type |
|---|---|
voice | impl Into<String> |
modalities
fn modalities(mut self, modalities: Vec<String>) -> SelfSet modalities
Parameters:
| Name | Type |
|---|---|
modalities | Vec<String> |
turn_detection
fn turn_detection(mut self, mode: impl Into<String>) -> SelfSet turn detection
Parameters:
| Name | Type |
|---|---|
mode | impl Into<String> |
temperature
fn temperature(mut self, temp: f32) -> SelfSet temperature
Parameters:
| Name | Type |
|---|---|
temp | f32 |
max_response_output_tokens
fn max_response_output_tokens(mut self, tokens: usize) -> SelfSet max tokens
Parameters:
| Name | Type |
|---|---|
tokens | usize |
instructions
fn instructions(mut self, instructions: impl Into<String>) -> SelfSet instructions
Parameters:
| Name | Type |
|---|---|
instructions | impl Into<String> |
Source
View on GitHubpraisonai/src/agents/mod.rs at line 1225