pub enum MessageLikeRepresentation {
Tuple(String, String),
String(String),
Message(Box<BaseMessage>),
Placeholder {
variable_name: String,
optional: bool,
},
}Expand description
Representation of a message-like that can be converted to MessageLike.
Variants§
Tuple(String, String)
A (role, content) tuple.
String(String)
A string (shorthand for human message).
Message(Box<BaseMessage>)
A base message.
Placeholder
A placeholder configuration.
Implementations§
Source§impl MessageLikeRepresentation
impl MessageLikeRepresentation
Sourcepub fn tuple(role: impl Into<String>, content: impl Into<String>) -> Self
pub fn tuple(role: impl Into<String>, content: impl Into<String>) -> Self
Create a tuple representation.
Sourcepub fn string(content: impl Into<String>) -> Self
pub fn string(content: impl Into<String>) -> Self
Create a string representation (human message).
Sourcepub fn placeholder(variable_name: impl Into<String>, optional: bool) -> Self
pub fn placeholder(variable_name: impl Into<String>, optional: bool) -> Self
Create a placeholder representation.
Trait Implementations§
Source§impl Clone for MessageLikeRepresentation
impl Clone for MessageLikeRepresentation
Source§fn clone(&self) -> MessageLikeRepresentation
fn clone(&self) -> MessageLikeRepresentation
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 moreAuto Trait Implementations§
impl Freeze for MessageLikeRepresentation
impl RefUnwindSafe for MessageLikeRepresentation
impl Send for MessageLikeRepresentation
impl Sync for MessageLikeRepresentation
impl Unpin for MessageLikeRepresentation
impl UnwindSafe for MessageLikeRepresentation
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