pub enum ModelRequestPart {
SystemPrompt {
text: String,
metadata: Metadata,
},
UserPrompt {
content: Vec<ContentPart>,
name: Option<String>,
metadata: Metadata,
},
ToolReturn(ToolReturnPart),
RetryPrompt {
text: String,
tool_call_id: Option<String>,
metadata: Metadata,
},
Instruction {
text: String,
metadata: Metadata,
},
}Expand description
Request part sent to a model.
Variants§
SystemPrompt
System or developer instruction.
UserPrompt
User prompt.
Fields
§
content: Vec<ContentPart>User content parts.
ToolReturn(ToolReturnPart)
Tool return sent back to the model.
RetryPrompt
Retry or validation feedback.
Fields
Instruction
Structured instruction fragment.
Trait Implementations§
Source§impl Clone for ModelRequestPart
impl Clone for ModelRequestPart
Source§fn clone(&self) -> ModelRequestPart
fn clone(&self) -> ModelRequestPart
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 ModelRequestPart
impl Debug for ModelRequestPart
Source§impl<'de> Deserialize<'de> for ModelRequestPart
impl<'de> Deserialize<'de> for ModelRequestPart
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
impl Eq for ModelRequestPart
Source§impl PartialEq for ModelRequestPart
impl PartialEq for ModelRequestPart
Source§impl Serialize for ModelRequestPart
impl Serialize for ModelRequestPart
impl StructuralPartialEq for ModelRequestPart
Auto Trait Implementations§
impl Freeze for ModelRequestPart
impl RefUnwindSafe for ModelRequestPart
impl Send for ModelRequestPart
impl Sync for ModelRequestPart
impl Unpin for ModelRequestPart
impl UnsafeUnpin for ModelRequestPart
impl UnwindSafe for ModelRequestPart
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