pub enum SessionInput {
Text {
text: String,
},
Audio {
media_type: String,
data: Vec<u8>,
},
FunctionResult(FunctionResult),
TurnStart,
TurnEnd,
CancelTurn,
}Expand description
Input sent to an interactive session.
Variants§
Text
One complete text turn.
Audio
One raw audio chunk in the configured input format.
Fields
FunctionResult(FunctionResult)
A completed client-function result.
TurnStart
Starts a caller-managed audio turn.
TurnEnd
Ends caller-managed audio input or, where supported, explicitly ends the currently submitted automatic-audio segment.
The supplied OpenAI backend requires manual turn detection. This input does not complete or cancel the provider response.
CancelTurn
Cancels the active provider response when supported.
Trait Implementations§
Source§impl Clone for SessionInput
impl Clone for SessionInput
Source§impl Debug for SessionInput
impl Debug for SessionInput
Source§impl<'de> Deserialize<'de> for SessionInput
impl<'de> Deserialize<'de> for SessionInput
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
Source§impl PartialEq for SessionInput
impl PartialEq for SessionInput
Source§impl Serialize for SessionInput
impl Serialize for SessionInput
impl StructuralPartialEq for SessionInput
Auto Trait Implementations§
impl Freeze for SessionInput
impl RefUnwindSafe for SessionInput
impl Send for SessionInput
impl Sync for SessionInput
impl Unpin for SessionInput
impl UnsafeUnpin for SessionInput
impl UnwindSafe for SessionInput
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