pub enum CompactInputItem {
ConfigurationUpdate {
reasoning: ConfigurationReasoning,
},
Message {
role: String,
content: CompactContent,
},
FunctionCall {
call_id: String,
name: String,
arguments: String,
},
FunctionCallOutput {
call_id: String,
output: String,
},
Compaction {
encrypted_content: String,
},
ProviderItem(Value),
}Expand description
Transport-neutral input item accepted by native conversation compaction.
Variants§
ConfigurationUpdate
Fields
§
reasoning: ConfigurationReasoningMessage
User, assistant, or developer message.
FunctionCall
Function call emitted by the assistant.
Fields
FunctionCallOutput
Output corresponding to a function call.
Fields
Compaction
Opaque output from an earlier compaction pass.
ProviderItem(Value)
Provider-native reasoning or other retained items, replayed verbatim.
Implementations§
Source§impl CompactInputItem
impl CompactInputItem
Sourcepub fn from_llm_message(msg: &LlmMessage) -> Vec<Self>
pub fn from_llm_message(msg: &LlmMessage) -> Vec<Self>
Convert one provider-neutral message to its ordered compact input items.
Assistant tool calls expand to function-call items and tool messages become function-call outputs.
pub fn is_assistant_item(&self) -> bool
Trait Implementations§
Source§impl Clone for CompactInputItem
impl Clone for CompactInputItem
Source§fn clone(&self) -> CompactInputItem
fn clone(&self) -> CompactInputItem
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 CompactInputItem
impl Debug for CompactInputItem
Source§impl<'de> Deserialize<'de> for CompactInputItem
impl<'de> Deserialize<'de> for CompactInputItem
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 From<&CompactOutputItem> for CompactInputItem
impl From<&CompactOutputItem> for CompactInputItem
Source§fn from(item: &CompactOutputItem) -> Self
fn from(item: &CompactOutputItem) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for CompactInputItem
impl RefUnwindSafe for CompactInputItem
impl Send for CompactInputItem
impl Sync for CompactInputItem
impl Unpin for CompactInputItem
impl UnsafeUnpin for CompactInputItem
impl UnwindSafe for CompactInputItem
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