pub struct HumanMessage {
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
Human message
Fields§
§content: MessageContent
The 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§
Source§impl HumanMessage
impl HumanMessage
Sourcepub fn new_with_blocks(content: Vec<ContentBlock>) -> Self
pub fn new_with_blocks(content: Vec<ContentBlock>) -> Self
Create a new human message with content blocks
Trait Implementations§
Source§impl BaseMessage for HumanMessage
impl BaseMessage for HumanMessage
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 HumanMessage
impl Clone for HumanMessage
Source§fn clone(&self) -> HumanMessage
fn clone(&self) -> HumanMessage
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 HumanMessage
impl Debug for HumanMessage
Source§impl<'de> Deserialize<'de> for HumanMessage
impl<'de> Deserialize<'de> for HumanMessage
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 HumanMessage
impl PartialEq for HumanMessage
Source§impl Serializable for HumanMessage
impl Serializable for HumanMessage
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 HumanMessage
impl Serialize for HumanMessage
impl StructuralPartialEq for HumanMessage
Auto Trait Implementations§
impl Freeze for HumanMessage
impl RefUnwindSafe for HumanMessage
impl Send for HumanMessage
impl Sync for HumanMessage
impl Unpin for HumanMessage
impl UnwindSafe for HumanMessage
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