Struct langchain_rust::schemas::prompt::PromptValue
source · pub struct PromptValue { /* private fields */ }
Implementations§
source§impl PromptValue
impl PromptValue
pub fn from_string(text: &str) -> Self
pub fn from_messages(messages: Vec<Message>) -> Self
pub fn to_string(&self) -> String
pub fn to_chat_messages(&self) -> Vec<Message>
Trait Implementations§
source§impl Clone for PromptValue
impl Clone for PromptValue
source§fn clone(&self) -> PromptValue
fn clone(&self) -> PromptValue
Returns a copy 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 PromptValue
impl RefUnwindSafe for PromptValue
impl Send for PromptValue
impl Sync for PromptValue
impl Unpin for PromptValue
impl UnwindSafe for PromptValue
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