pub struct Message {
pub role: Role,
pub content: Vec<Content>,
pub reasoning: Option<String>,
}Fields§
§role: Role§content: Vec<Content>§reasoning: Option<String>Implementations§
Source§impl Message
impl Message
pub fn new( role: Role, content: Option<String>, reasoning: Option<String>, ) -> Self
pub fn with_content( role: Role, content: Vec<Content>, reasoning: Option<String>, ) -> Self
pub fn system(content: String) -> Self
pub fn user(content: String) -> Self
pub fn assistant(content: String) -> Self
pub fn with_files(prompt: String, filenames: &[String]) -> OrtResult<Self>
pub fn text(&self) -> Option<&str>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl UnsafeUnpin for Message
impl UnwindSafe for Message
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