pub struct AIMessage {
pub content: MessageContent,
pub additional_kwargs: HashMap<String, Value>,
pub response_metadata: HashMap<String, Value>,
pub name: Option<String>,
pub id: Option<String>,
}Expand description
AI message
Fields§
§content: MessageContentThe content of the message
additional_kwargs: HashMap<String, Value>Additional keyword arguments
response_metadata: HashMap<String, Value>Response metadata
name: Option<String>Optional name for the message
id: Option<String>Optional unique identifier
Implementations§
Trait Implementations§
Source§impl BaseMessage for AIMessage
impl BaseMessage for AIMessage
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<'de> Deserialize<'de> for AIMessage
impl<'de> Deserialize<'de> for AIMessage
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 Serializable for AIMessage
impl Serializable for AIMessage
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)
impl StructuralPartialEq for AIMessage
Auto Trait Implementations§
impl Freeze for AIMessage
impl RefUnwindSafe for AIMessage
impl Send for AIMessage
impl Sync for AIMessage
impl Unpin for AIMessage
impl UnwindSafe for AIMessage
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