pub enum AssistantPart {
Text(TextPart),
File(FilePart),
Reasoning {
text: String,
provider_options: Option<ProviderOptions>,
},
ReasoningFile {
data: FileData,
media_type: String,
provider_options: Option<ProviderOptions>,
},
Custom {
kind: String,
provider_options: Option<ProviderOptions>,
},
ToolCall(ToolCallPart),
ToolResult(ToolResultPart),
}Expand description
Content part allowed in a Message::Assistant.
Variants§
Text(TextPart)
Plain text reply.
File(FilePart)
File generated by the model.
Reasoning
Reasoning trace.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
ReasoningFile
File generated as part of a reasoning trace.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
Custom
Provider-specific opaque part. kind is provider.subtype.
Fields
§
provider_options: Option<ProviderOptions>Provider-specific options.
ToolCall(ToolCallPart)
Tool invocation the model wants the client (or provider) to execute.
ToolResult(ToolResultPart)
Inline tool result (used when the same turn carries the result).
Trait Implementations§
Source§impl Clone for AssistantPart
impl Clone for AssistantPart
Source§fn clone(&self) -> AssistantPart
fn clone(&self) -> AssistantPart
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 AssistantPart
impl Debug for AssistantPart
Source§impl<'de> Deserialize<'de> for AssistantPart
impl<'de> Deserialize<'de> for AssistantPart
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 AssistantPart
impl PartialEq for AssistantPart
Source§fn eq(&self, other: &AssistantPart) -> bool
fn eq(&self, other: &AssistantPart) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for AssistantPart
impl Serialize for AssistantPart
impl StructuralPartialEq for AssistantPart
Auto Trait Implementations§
impl Freeze for AssistantPart
impl RefUnwindSafe for AssistantPart
impl Send for AssistantPart
impl Sync for AssistantPart
impl Unpin for AssistantPart
impl UnsafeUnpin for AssistantPart
impl UnwindSafe for AssistantPart
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