pub enum Content {
Text(String),
ToolUse {
id: String,
name: String,
input: Json,
},
ToolResult {
id: String,
name: String,
output: Json,
is_error: bool,
},
}Expand description
One part of a message.
A message is a list of parts rather than a string because a single assistant turn can say something and ask for two tools, and every provider needs those parts kept apart to replay the turn back to it.
Variants§
Text(String)
ToolUse
The assistant asking for a tool to be run.
ToolResult
What the tool answered, fed back on the next turn.
Implementations§
Trait Implementations§
impl StructuralPartialEq for Content
Auto Trait Implementations§
impl Freeze for Content
impl RefUnwindSafe for Content
impl Send for Content
impl Sync for Content
impl Unpin for Content
impl UnsafeUnpin for Content
impl UnwindSafe for Content
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