pub enum BriefMessage {
Text {
role: Role,
content: String,
source: SourceId,
},
Image {
role: Role,
data: ImageData,
alt: Option<String>,
source: SourceId,
},
ToolCall {
id: String,
name: String,
args: Value,
source: SourceId,
},
ToolResult {
id: String,
content: String,
source: SourceId,
},
}Expand description
One message in a Brief’s conversation transcript.
Tagged with the SourceId of the contributing source so the
BriefReceipt can attribute every visible byte. Variants mirror the
Text | Image | ToolCall | ToolResult matrix.
Variants§
Text
Plain text content under a role.
Fields
Image
Image content under a role (typically User for vision turns).
Fields
ToolCall
A tool invocation the model previously emitted. Carries the original
tool call ID so a BriefMessage::ToolResult can be matched to it.
Fields
§
name: StringTool name (matches a ToolSchema::name).
ToolResult
The result returned for a prior tool call.
Implementations§
Trait Implementations§
Source§impl Clone for BriefMessage
impl Clone for BriefMessage
Source§fn clone(&self) -> BriefMessage
fn clone(&self) -> BriefMessage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 BriefMessage
impl Debug for BriefMessage
Source§impl<'de> Deserialize<'de> for BriefMessage
impl<'de> Deserialize<'de> for BriefMessage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BriefMessage
impl PartialEq for BriefMessage
Source§fn eq(&self, other: &BriefMessage) -> bool
fn eq(&self, other: &BriefMessage) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for BriefMessage
impl Serialize for BriefMessage
impl StructuralPartialEq for BriefMessage
Auto Trait Implementations§
impl Freeze for BriefMessage
impl RefUnwindSafe for BriefMessage
impl Send for BriefMessage
impl Sync for BriefMessage
impl Unpin for BriefMessage
impl UnsafeUnpin for BriefMessage
impl UnwindSafe for BriefMessage
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