pub enum InteractionEvent {
InteractionCreated {
interaction: StreamInteraction,
event_id: Option<String>,
metadata: Option<StreamMetadata>,
},
InteractionCompleted {
interaction: StreamInteraction,
event_id: Option<String>,
metadata: Option<StreamMetadata>,
},
InteractionStatusUpdate {
interaction_id: String,
status: InteractionStatus,
event_id: Option<String>,
metadata: Option<StreamMetadata>,
},
Error {
error: InteractionError,
event_id: Option<String>,
metadata: Option<StreamMetadata>,
},
StepStart {
index: usize,
step: Step,
event_id: Option<String>,
metadata: Option<StepDeltaMetadata>,
},
StepDelta {
index: usize,
delta: StepDeltaData,
event_id: Option<String>,
metadata: Option<StepDeltaMetadata>,
},
StepStop {
index: usize,
usage: Option<InteractionUsage>,
step_usage: Option<InteractionUsage>,
event_id: Option<String>,
metadata: Option<StreamMetadata>,
},
}Expand description
SSE event from the Interactions API stream.
Each event represents a lifecycle event in the interaction: interaction creation/completion, step start/delta/stop, status updates, or errors.
Variants§
InteractionCreated
InteractionCompleted
InteractionStatusUpdate
Error
StepStart
StepDelta
StepStop
Fields
§
usage: Option<InteractionUsage>§
step_usage: Option<InteractionUsage>§
metadata: Option<StreamMetadata>Trait Implementations§
Source§impl Clone for InteractionEvent
impl Clone for InteractionEvent
Source§fn clone(&self) -> InteractionEvent
fn clone(&self) -> InteractionEvent
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 Debug for InteractionEvent
impl Debug for InteractionEvent
Source§impl<'de> Deserialize<'de> for InteractionEvent
impl<'de> Deserialize<'de> for InteractionEvent
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 InteractionEvent
impl RefUnwindSafe for InteractionEvent
impl Send for InteractionEvent
impl Sync for InteractionEvent
impl Unpin for InteractionEvent
impl UnsafeUnpin for InteractionEvent
impl UnwindSafe for InteractionEvent
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