pub enum InteractionInput {
Text(String),
Content(InteractionContent),
Contents(Vec<InteractionContent>),
Turns(Vec<InteractionTurn>),
}Expand description
Interactions 输入(支持文本、内容列表或完整 turns)。
Variants§
Text(String)
Content(InteractionContent)
Contents(Vec<InteractionContent>)
Turns(Vec<InteractionTurn>)
Implementations§
Source§impl InteractionInput
impl InteractionInput
pub fn text(text: impl Into<String>) -> Self
pub const fn content(content: InteractionContent) -> Self
pub const fn contents(contents: Vec<InteractionContent>) -> Self
pub const fn turns(turns: Vec<InteractionTurn>) -> Self
Trait Implementations§
Source§impl Clone for InteractionInput
impl Clone for InteractionInput
Source§fn clone(&self) -> InteractionInput
fn clone(&self) -> InteractionInput
Returns a duplicate of the value. Read more
1.0.0 · 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 InteractionInput
impl Debug for InteractionInput
Source§impl<'de> Deserialize<'de> for InteractionInput
impl<'de> Deserialize<'de> for InteractionInput
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<&str> for InteractionInput
impl From<&str> for InteractionInput
Source§impl From<String> for InteractionInput
impl From<String> for InteractionInput
Auto Trait Implementations§
impl Freeze for InteractionInput
impl RefUnwindSafe for InteractionInput
impl Send for InteractionInput
impl Sync for InteractionInput
impl Unpin for InteractionInput
impl UnsafeUnpin for InteractionInput
impl UnwindSafe for InteractionInput
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