(
&mut self,
tool_call_id: impl Into<String>,
content: impl Into<String>,
is_error: bool,
)
| 172 | } |
| 173 | |
| 174 | pub fn add_tool_result( |
| 175 | &mut self, |
| 176 | tool_call_id: impl Into<String>, |
| 177 | content: impl Into<String>, |
| 178 | is_error: bool, |
| 179 | ) { |
| 180 | self.parts.push(MessagePart { |
| 181 | id: format!("prt_{}", uuid::Uuid::new_v4()), |
| 182 | part_type: PartType::ToolResult { |
| 183 | tool_call_id: tool_call_id.into(), |
| 184 | content: content.into(), |
| 185 | is_error, |
| 186 | }, |
| 187 | created_at: Utc::now(), |
| 188 | message_id: None, |
| 189 | }); |
| 190 | } |
| 191 | |
| 192 | pub fn add_file( |
| 193 | &mut self, |
no outgoing calls