pub enum ChatCompletionMessage {
System(SystemMessage),
User(UserMessage),
Assistant(AssistantMessage),
Tool(ToolMessage),
}
Variants§
System(SystemMessage)
A message from a system.
User(UserMessage)
A message from a human.
Assistant(AssistantMessage)
A message from the assistant.
Tool(ToolMessage)
A message from a tool.
Implementations§
Source§impl ChatCompletionMessage
impl ChatCompletionMessage
pub fn new_system( content: impl Into<String>, name: &str, ) -> ChatCompletionMessage
pub fn new_user(content: impl Into<String>, name: &str) -> ChatCompletionMessage
Trait Implementations§
Source§impl Clone for ChatCompletionMessage
impl Clone for ChatCompletionMessage
Source§fn clone(&self) -> ChatCompletionMessage
fn clone(&self) -> ChatCompletionMessage
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 moreSource§impl Debug for ChatCompletionMessage
impl Debug for ChatCompletionMessage
Source§impl Display for ChatCompletionMessage
impl Display for ChatCompletionMessage
Source§impl EnumMessage for ChatCompletionMessage
impl EnumMessage for ChatCompletionMessage
fn get_message(&self) -> Option<&'static str>
fn get_detailed_message(&self) -> Option<&'static str>
Source§fn get_documentation(&self) -> Option<&'static str>
fn get_documentation(&self) -> Option<&'static str>
Get the doc comment associated with a variant if it exists.
fn get_serializations(&self) -> &'static [&'static str]
Source§impl Serialize for ChatCompletionMessage
impl Serialize for ChatCompletionMessage
Source§impl VariantNames for ChatCompletionMessage
impl VariantNames for ChatCompletionMessage
Auto Trait Implementations§
impl Freeze for ChatCompletionMessage
impl RefUnwindSafe for ChatCompletionMessage
impl Send for ChatCompletionMessage
impl Sync for ChatCompletionMessage
impl Unpin for ChatCompletionMessage
impl UnwindSafe for ChatCompletionMessage
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