pub struct ToolMessage {
pub content: MessageContent,
pub tool_call_id: String,
pub additional_kwargs: HashMap<String, Value>,
pub response_metadata: HashMap<String, Value>,
pub name: Option<String>,
pub id: Option<String>,
}
Expand description
Tool message
Fields§
§content: MessageContent
The content of the message
tool_call_id: String
The tool call ID this message is responding to
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 ToolMessage
impl BaseMessage for ToolMessage
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 ToolMessage
impl Clone for ToolMessage
Source§fn clone(&self) -> ToolMessage
fn clone(&self) -> ToolMessage
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 ToolMessage
impl Debug for ToolMessage
Source§impl<'de> Deserialize<'de> for ToolMessage
impl<'de> Deserialize<'de> for ToolMessage
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 ToolMessage
impl PartialEq for ToolMessage
Source§impl Serializable for ToolMessage
impl Serializable for ToolMessage
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 ToolMessage
impl Serialize for ToolMessage
impl StructuralPartialEq for ToolMessage
Auto Trait Implementations§
impl Freeze for ToolMessage
impl RefUnwindSafe for ToolMessage
impl Send for ToolMessage
impl Sync for ToolMessage
impl Unpin for ToolMessage
impl UnwindSafe for ToolMessage
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