(
&mut self,
id: impl Into<String>,
name: impl Into<String>,
input: serde_json::Value,
)
| 154 | } |
| 155 | |
| 156 | pub fn add_tool_call( |
| 157 | &mut self, |
| 158 | id: impl Into<String>, |
| 159 | name: impl Into<String>, |
| 160 | input: serde_json::Value, |
| 161 | ) { |
| 162 | self.parts.push(MessagePart { |
| 163 | id: format!("prt_{}", uuid::Uuid::new_v4()), |
| 164 | part_type: PartType::ToolCall { |
| 165 | id: id.into(), |
| 166 | name: name.into(), |
| 167 | input, |
| 168 | }, |
| 169 | created_at: Utc::now(), |
| 170 | message_id: None, |
| 171 | }); |
| 172 | } |
| 173 | |
| 174 | pub fn add_tool_result( |
| 175 | &mut self, |
no outgoing calls