pub struct ToolReturnPart {
pub tool_name: String,
pub content: ToolReturnContent,
pub tool_call_id: Option<String>,
pub timestamp: DateTime<Utc>,
}Expand description
Tool return part.
Fields§
§tool_name: StringName of the tool.
content: ToolReturnContentThe return content.
tool_call_id: Option<String>Tool call ID this is responding to.
timestamp: DateTime<Utc>When this part was created.
Implementations§
Source§impl ToolReturnPart
impl ToolReturnPart
Sourcepub fn new(
tool_name: impl Into<String>,
content: impl Into<ToolReturnContent>,
) -> ToolReturnPart
pub fn new( tool_name: impl Into<String>, content: impl Into<ToolReturnContent>, ) -> ToolReturnPart
Create a new tool return part.
Sourcepub fn with_tool_call_id(self, id: impl Into<String>) -> ToolReturnPart
pub fn with_tool_call_id(self, id: impl Into<String>) -> ToolReturnPart
Set the tool call ID.
Sourcepub fn with_timestamp(self, timestamp: DateTime<Utc>) -> ToolReturnPart
pub fn with_timestamp(self, timestamp: DateTime<Utc>) -> ToolReturnPart
Set the timestamp.
Trait Implementations§
Source§impl Clone for ToolReturnPart
impl Clone for ToolReturnPart
Source§fn clone(&self) -> ToolReturnPart
fn clone(&self) -> ToolReturnPart
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 ToolReturnPart
impl Debug for ToolReturnPart
Source§impl<'de> Deserialize<'de> for ToolReturnPart
impl<'de> Deserialize<'de> for ToolReturnPart
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolReturnPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ToolReturnPart, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ToolReturnPart
impl PartialEq for ToolReturnPart
Source§impl Serialize for ToolReturnPart
impl Serialize for ToolReturnPart
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for ToolReturnPart
Auto Trait Implementations§
impl Freeze for ToolReturnPart
impl RefUnwindSafe for ToolReturnPart
impl Send for ToolReturnPart
impl Sync for ToolReturnPart
impl Unpin for ToolReturnPart
impl UnwindSafe for ToolReturnPart
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