pub struct AssistantTurn {
pub turn_id: TurnId,
pub conversation_id: ConversationId,
pub blocks: Vec<ResponseBlock>,
pub replay_token: ReplayToken,
pub subjects: Vec<CaseRef>,
pub expectations: Vec<Expectation>,
pub done: Vec<DoneAct>,
}Expand description
The persisted assistant turn (spec §18.1).
Fields§
§turn_id: TurnIdThe user turn answered.
conversation_id: ConversationIdThe conversation.
blocks: Vec<ResponseBlock>Ordered blocks.
replay_token: ReplayTokenToken to retrieve the replay record.
subjects: Vec<CaseRef>The cases this turn was about, so the next turn knows what the conversation is on. Read back as a fallback for a turn with no subject of its own, never as an addition to its own.
expectations: Vec<Expectation>What this reply asked the user for. The next turn reads it, and only that one.
done: Vec<DoneAct>The acts this turn did, so a correction in the next message changes what it says of one and keeps the rest. The next turn reads it, and only that one.
Implementations§
Source§impl AssistantTurn
impl AssistantTurn
Sourcepub fn receipts(&self) -> impl Iterator<Item = &OperationalReceipt>
pub fn receipts(&self) -> impl Iterator<Item = &OperationalReceipt>
All receipt blocks.
Sourcepub fn interactions(&self) -> impl Iterator<Item = &InteractionView>
pub fn interactions(&self) -> impl Iterator<Item = &InteractionView>
All interaction views.
Trait Implementations§
Source§impl Clone for AssistantTurn
impl Clone for AssistantTurn
Source§impl Debug for AssistantTurn
impl Debug for AssistantTurn
Source§impl<'de> Deserialize<'de> for AssistantTurn
impl<'de> Deserialize<'de> for AssistantTurn
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
impl Eq for AssistantTurn
Source§impl PartialEq for AssistantTurn
impl PartialEq for AssistantTurn
Source§impl Serialize for AssistantTurn
impl Serialize for AssistantTurn
impl StructuralPartialEq for AssistantTurn
Auto Trait Implementations§
impl Freeze for AssistantTurn
impl RefUnwindSafe for AssistantTurn
impl Send for AssistantTurn
impl Sync for AssistantTurn
impl Unpin for AssistantTurn
impl UnsafeUnpin for AssistantTurn
impl UnwindSafe for AssistantTurn
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.