Struct async_openai::types::ChatCompletionRequestMessage
source · 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
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<ChatCompletionRequestMessage> for ChatCompletionRequestMessage
impl PartialEq<ChatCompletionRequestMessage> for ChatCompletionRequestMessage
source§fn eq(&self, other: &ChatCompletionRequestMessage) -> bool
fn eq(&self, other: &ChatCompletionRequestMessage) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for ChatCompletionRequestMessage
Auto Trait Implementations§
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