pub enum PersistedAssistantPart {
Text {
text: String,
metadata: Option<SafeModelMetadata>,
},
Reasoning {
text: String,
metadata: Option<SafeModelMetadata>,
},
ToolCall {
id: ModelCallId,
provider_item_id: Option<ProviderItemId>,
name: SafeCode,
input: Value,
raw_input: Option<String>,
metadata: Option<SafeModelMetadata>,
},
ToolResult {
tool_call_id: ModelCallId,
content: PersistedToolContent,
is_error: bool,
metadata: Option<SafeModelMetadata>,
},
File {
file: PersistedFilePart,
},
Source {
id: Option<String>,
url: Option<String>,
title: Option<String>,
media_type: Option<String>,
excerpt: Option<String>,
metadata: Option<SafeModelMetadata>,
},
ToolApproval {
tool_call_id: ModelCallId,
message: Option<String>,
metadata: Option<SafeModelMetadata>,
},
Custom {
kind: SafeCode,
data: Value,
metadata: Option<SafeModelMetadata>,
},
}Variants§
Text
Reasoning
ToolCall
ToolResult
File
Fields
§
file: PersistedFilePartSource
Fields
§
metadata: Option<SafeModelMetadata>ToolApproval
Custom
Trait Implementations§
Source§impl Clone for PersistedAssistantPart
impl Clone for PersistedAssistantPart
Source§fn clone(&self) -> PersistedAssistantPart
fn clone(&self) -> PersistedAssistantPart
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 PersistedAssistantPart
impl Debug for PersistedAssistantPart
Source§impl<'de> Deserialize<'de> for PersistedAssistantPart
impl<'de> Deserialize<'de> for PersistedAssistantPart
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 JsonSchema for PersistedAssistantPart
impl JsonSchema for PersistedAssistantPart
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for PersistedAssistantPart
impl PartialEq for PersistedAssistantPart
Source§fn eq(&self, other: &PersistedAssistantPart) -> bool
fn eq(&self, other: &PersistedAssistantPart) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for PersistedAssistantPart
impl Serialize for PersistedAssistantPart
impl StructuralPartialEq for PersistedAssistantPart
Auto Trait Implementations§
impl Freeze for PersistedAssistantPart
impl RefUnwindSafe for PersistedAssistantPart
impl Send for PersistedAssistantPart
impl Sync for PersistedAssistantPart
impl Unpin for PersistedAssistantPart
impl UnsafeUnpin for PersistedAssistantPart
impl UnwindSafe for PersistedAssistantPart
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