pub struct LoopAIMessage {
pub type: Option<String>,
pub content: Option<Value>,
pub phase: Option<String>,
}Expand description
Loop-tagged assistant payload forwarded on mode=messages streams
(Go LoopAIMessage parity).
Fields§
§type: Option<String>Message type (typically ai).
content: Option<Value>Message content (string, array of blocks, or object).
phase: Option<String>Stream phase (text_completion, goal_completion, etc.).
Implementations§
Source§impl LoopAIMessage
impl LoopAIMessage
Sourcepub fn loop_ai_text(&self) -> String
pub fn loop_ai_text(&self) -> String
Extract plain text from the content payload.
Trait Implementations§
Source§impl Clone for LoopAIMessage
impl Clone for LoopAIMessage
Source§fn clone(&self) -> LoopAIMessage
fn clone(&self) -> LoopAIMessage
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 LoopAIMessage
impl Debug for LoopAIMessage
Source§impl Default for LoopAIMessage
impl Default for LoopAIMessage
Source§fn default() -> LoopAIMessage
fn default() -> LoopAIMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for LoopAIMessage
impl<'de> Deserialize<'de> for LoopAIMessage
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 LoopAIMessage
impl PartialEq for LoopAIMessage
Source§impl Serialize for LoopAIMessage
impl Serialize for LoopAIMessage
impl StructuralPartialEq for LoopAIMessage
Auto Trait Implementations§
impl Freeze for LoopAIMessage
impl RefUnwindSafe for LoopAIMessage
impl Send for LoopAIMessage
impl Sync for LoopAIMessage
impl Unpin for LoopAIMessage
impl UnsafeUnpin for LoopAIMessage
impl UnwindSafe for LoopAIMessage
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