pub enum Message {
System(String),
User(String),
Assistant {
text: Option<String>,
tool_calls: Vec<ToolCall>,
},
ToolResult {
id: String,
content: String,
is_error: bool,
},
}Expand description
One conversation message. Assistant may carry tool calls; ToolResult
feeds a tool’s output back into the conversation as the next observation.
Variants§
System(String)
User(String)
Assistant
ToolResult
A tool/exec result fed back into the loop. is_error carries the MCP
isError: true signal: the tool ran and reported a domain failure the
model should see and react to. A transport error never reaches here —
it fails the call instead of becoming an observation.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Message
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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