pub enum AnyMessage {
Human(HumanMessage),
AI(AIMessage),
System(SystemMessage),
Tool(ToolMessage),
}
Expand description
Union type for all message types
Variants§
Human(HumanMessage)
Human message
AI(AIMessage)
AI message
System(SystemMessage)
System message
Tool(ToolMessage)
Tool message
Implementations§
Source§impl AnyMessage
impl AnyMessage
Trait Implementations§
Source§impl BaseMessage for AnyMessage
impl BaseMessage for AnyMessage
Source§fn content(&self) -> &MessageContent
fn content(&self) -> &MessageContent
Get the content of the message
Source§fn message_type(&self) -> &str
fn message_type(&self) -> &str
Get the message type
Source§impl Clone for AnyMessage
impl Clone for AnyMessage
Source§fn clone(&self) -> AnyMessage
fn clone(&self) -> AnyMessage
Returns a duplicate of the value. Read more
1.0.0 · 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 AnyMessage
impl Debug for AnyMessage
Source§impl<'de> Deserialize<'de> for AnyMessage
impl<'de> Deserialize<'de> for AnyMessage
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 AnyMessage
impl PartialEq for AnyMessage
Source§impl Serializable for AnyMessage
impl Serializable for AnyMessage
Source§fn is_serializable() -> bool
fn is_serializable() -> bool
Check if this object is serializable Read more
Source§fn to_json_pretty(&self) -> Result<String>
fn to_json_pretty(&self) -> Result<String>
Serialize this object to a pretty-printed JSON string
Source§fn to_dict(&self) -> Result<HashMap<String, Value>>
fn to_dict(&self) -> Result<HashMap<String, Value>>
Serialize this object to a dictionary (HashMap)
Source§impl Serialize for AnyMessage
impl Serialize for AnyMessage
impl StructuralPartialEq for AnyMessage
Auto Trait Implementations§
impl Freeze for AnyMessage
impl RefUnwindSafe for AnyMessage
impl Send for AnyMessage
impl Sync for AnyMessage
impl Unpin for AnyMessage
impl UnwindSafe for AnyMessage
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