pub struct AiOptimizationLlmMessage {
pub role: String,
pub message: String,
}Expand description
A single turn of a conversation passed via message_chain.
Fields§
§role: StringRole of the message author (e.g. "user", "assistant").
message: StringText content of the message.
Implementations§
Source§impl AiOptimizationLlmMessage
impl AiOptimizationLlmMessage
Sourcepub fn new(role: &str, message: &str) -> AiOptimizationLlmMessage
pub fn new(role: &str, message: &str) -> AiOptimizationLlmMessage
Creates a message with the given role and content.
Trait Implementations§
Source§impl Clone for AiOptimizationLlmMessage
impl Clone for AiOptimizationLlmMessage
Source§impl Debug for AiOptimizationLlmMessage
impl Debug for AiOptimizationLlmMessage
Source§impl Default for AiOptimizationLlmMessage
impl Default for AiOptimizationLlmMessage
Source§impl<'de> Deserialize<'de> for AiOptimizationLlmMessage
impl<'de> Deserialize<'de> for AiOptimizationLlmMessage
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
Auto Trait Implementations§
impl Freeze for AiOptimizationLlmMessage
impl RefUnwindSafe for AiOptimizationLlmMessage
impl Send for AiOptimizationLlmMessage
impl Sync for AiOptimizationLlmMessage
impl Unpin for AiOptimizationLlmMessage
impl UnsafeUnpin for AiOptimizationLlmMessage
impl UnwindSafe for AiOptimizationLlmMessage
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