pub struct RealtimeSessionCreateResponse {Show 13 fields
pub client_secret: RealtimeSessionClientSecret,
pub type_: String,
pub audio: Option<Audio>,
pub include: Option<Vec<String>>,
pub instructions: Option<String>,
pub max_output_tokens: Option<String>,
pub model: Option<String>,
pub output_modalities: Option<Vec<Value>>,
pub prompt: Option<Value>,
pub tool_choice: Option<ToolChoice>,
pub tools: Option<Vec<RealtimeMcpTool>>,
pub tracing: Option<Tracing>,
pub truncation: Option<RealtimeTruncation>,
}Expand description
A new Realtime session configuration, with an ephemeral key.
Fields§
§client_secret: RealtimeSessionClientSecretEphemeral key returned by the API.
type_: StringThe type of session to create. Always realtime for the Realtime API.
audio: Option<Audio>Configuration for input and output audio.
include: Option<Vec<String>>Additional fields to include in server outputs.
instructions: Option<String>The default system instructions (i.e.
max_output_tokens: Option<String>Maximum number of output tokens for a single assistant response, inclusive of
model: Option<String>The Realtime model used for this session.
output_modalities: Option<Vec<Value>>The set of modalities the model can respond with.
prompt: Option<Value>Reference to a prompt template and its variables.
tool_choice: Option<ToolChoice>How the model chooses tools.
tools: Option<Vec<RealtimeMcpTool>>Tools available to the model.
tracing: Option<Tracing>Realtime API can write session traces to the
truncation: Option<RealtimeTruncation>When the number of tokens in a conversation exceeds the model’s input token
Trait Implementations§
Source§impl Clone for RealtimeSessionCreateResponse
impl Clone for RealtimeSessionCreateResponse
Source§fn clone(&self) -> RealtimeSessionCreateResponse
fn clone(&self) -> RealtimeSessionCreateResponse
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<'de> Deserialize<'de> for RealtimeSessionCreateResponse
impl<'de> Deserialize<'de> for RealtimeSessionCreateResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for RealtimeSessionCreateResponse
impl RefUnwindSafe for RealtimeSessionCreateResponse
impl Send for RealtimeSessionCreateResponse
impl Sync for RealtimeSessionCreateResponse
impl Unpin for RealtimeSessionCreateResponse
impl UnsafeUnpin for RealtimeSessionCreateResponse
impl UnwindSafe for RealtimeSessionCreateResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more