pub struct ChatCompletionRequestMessageArgs { /* private fields */ }
Expand description
Builder for ChatCompletionRequestMessage
.
Implementations§
source§impl ChatCompletionRequestMessageArgs
impl ChatCompletionRequestMessageArgs
sourcepub fn role<VALUE: Into<Role>>(&mut self, value: VALUE) -> &mut Self
pub fn role<VALUE: Into<Role>>(&mut self, value: VALUE) -> &mut Self
The role of the author of this message.
sourcepub fn content<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn content<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The contents of the message
sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The name of the user in a multi-user chat
sourcepub fn build(&self) -> Result<ChatCompletionRequestMessage, OpenAIError>
pub fn build(&self) -> Result<ChatCompletionRequestMessage, OpenAIError>
Trait Implementations§
source§impl Clone for ChatCompletionRequestMessageArgs
impl Clone for ChatCompletionRequestMessageArgs
source§fn clone(&self) -> ChatCompletionRequestMessageArgs
fn clone(&self) -> ChatCompletionRequestMessageArgs
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 RefUnwindSafe for ChatCompletionRequestMessageArgs
impl Send for ChatCompletionRequestMessageArgs
impl Sync for ChatCompletionRequestMessageArgs
impl Unpin for ChatCompletionRequestMessageArgs
impl UnwindSafe for ChatCompletionRequestMessageArgs
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