pub struct ChatCompletionRequestMessage {
pub role: Role,
pub content: String,
pub name: Option<String>,
}
Fields§
§role: Role
The role of the author of this message.
content: String
The contents of the message
name: Option<String>
The name of the user in a multi-user chat
Implementations§
Source§impl ChatCompletionRequestMessage
impl ChatCompletionRequestMessage
pub fn new(role: Role, content: String) -> ChatCompletionRequestMessage
Trait Implementations§
Source§impl Clone for ChatCompletionRequestMessage
impl Clone for ChatCompletionRequestMessage
Source§fn clone(&self) -> ChatCompletionRequestMessage
fn clone(&self) -> ChatCompletionRequestMessage
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 ChatCompletionRequestMessage
impl Debug for ChatCompletionRequestMessage
Source§impl Default for ChatCompletionRequestMessage
impl Default for ChatCompletionRequestMessage
Source§fn default() -> ChatCompletionRequestMessage
fn default() -> ChatCompletionRequestMessage
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ChatCompletionRequestMessage
impl<'de> Deserialize<'de> for ChatCompletionRequestMessage
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
Source§impl PartialEq for ChatCompletionRequestMessage
impl PartialEq for ChatCompletionRequestMessage
Source§fn eq(&self, other: &ChatCompletionRequestMessage) -> bool
fn eq(&self, other: &ChatCompletionRequestMessage) -> bool
Tests for
self
and other
values to be equal, and is used by ==
.impl StructuralPartialEq for ChatCompletionRequestMessage
Auto Trait Implementations§
impl Freeze for ChatCompletionRequestMessage
impl RefUnwindSafe for ChatCompletionRequestMessage
impl Send for ChatCompletionRequestMessage
impl Sync for ChatCompletionRequestMessage
impl Unpin for ChatCompletionRequestMessage
impl UnwindSafe for ChatCompletionRequestMessage
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