pub struct ChatCompletionRequestUserMessageArgs { /* private fields */ }
Expand description
Builder for ChatCompletionRequestUserMessage
.
Implementations§
source§impl ChatCompletionRequestUserMessageArgs
impl ChatCompletionRequestUserMessageArgs
sourcepub fn content<VALUE: Into<ChatCompletionRequestUserMessageContent>>(
&mut self,
value: VALUE
) -> &mut Self
pub fn content<VALUE: Into<ChatCompletionRequestUserMessageContent>>( &mut self, value: VALUE ) -> &mut Self
The contents of the user message.
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 messages author, in this case user
.
sourcepub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn name<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
An optional name for the participant. Provides the model information to differentiate between participants of the same role.
sourcepub fn build(&self) -> Result<ChatCompletionRequestUserMessage, OpenAIError>
pub fn build(&self) -> Result<ChatCompletionRequestUserMessage, OpenAIError>
Builds a new ChatCompletionRequestUserMessage
.
§Errors
If a required field has not been initialized.
Trait Implementations§
source§impl Clone for ChatCompletionRequestUserMessageArgs
impl Clone for ChatCompletionRequestUserMessageArgs
source§fn clone(&self) -> ChatCompletionRequestUserMessageArgs
fn clone(&self) -> ChatCompletionRequestUserMessageArgs
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 ChatCompletionRequestUserMessageArgs
impl Send for ChatCompletionRequestUserMessageArgs
impl Sync for ChatCompletionRequestUserMessageArgs
impl Unpin for ChatCompletionRequestUserMessageArgs
impl UnwindSafe for ChatCompletionRequestUserMessageArgs
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