pub enum ContributionContent {
System {
text: String,
},
Text {
role: Role,
content: String,
},
Image {
role: Role,
data: ImageData,
alt: Option<String>,
},
ToolCall {
id: String,
name: String,
args: Value,
},
ToolResult {
id: String,
content: String,
},
Tool {
schema: ToolSchema,
},
}Expand description
What a Source can contribute to a crate::types::Brief.
One Contribution becomes (eventually) one
crate::types::BriefMessage or one ToolSchema in the final brief,
modulo budget pruning and governance redaction. The variants intentionally
mirror crate::types::BriefMessage plus a ContributionContent::System
variant for system-prompt text and a ContributionContent::Tool variant
for tool catalog entries.
Variants§
System
System-prompt text. Multiple contributions are concatenated in source order by the builder.
Text
Plain text content under a role.
Image
Image content under a role.
Fields
ToolCall
A prior tool invocation, replayed into the conversation.
Fields
name: StringTool name (matches a ToolSchema::name).
ToolResult
The result returned for a prior tool call.
Tool
A tool schema to be made available to the model this turn.
Fields
schema: ToolSchemaThe tool schema. Its source field is set by the builder when
the contribution is admitted.
Trait Implementations§
Source§impl Clone for ContributionContent
impl Clone for ContributionContent
Source§fn clone(&self) -> ContributionContent
fn clone(&self) -> ContributionContent
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ContributionContent
impl Debug for ContributionContent
Source§impl<'de> Deserialize<'de> for ContributionContent
impl<'de> Deserialize<'de> for ContributionContent
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>,
Source§impl PartialEq for ContributionContent
impl PartialEq for ContributionContent
Source§fn eq(&self, other: &ContributionContent) -> bool
fn eq(&self, other: &ContributionContent) -> bool
self and other values to be equal, and is used by ==.