pub struct ChatCompletionRequestAssistantMessageArgs { /* private fields */ }
Expand description
Builder for ChatCompletionRequestAssistantMessage
.
Implementations§
Source§impl ChatCompletionRequestAssistantMessageArgs
impl ChatCompletionRequestAssistantMessageArgs
Sourcepub fn content<VALUE: Into<ChatCompletionRequestAssistantMessageContent>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn content<VALUE: Into<ChatCompletionRequestAssistantMessageContent>>( &mut self, value: VALUE, ) -> &mut Self
The contents of the assistant message. Required unless tool_calls
or function_call
is specified.
Sourcepub fn refusal<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn refusal<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The refusal message by the assistant.
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 audio<VALUE: Into<ChatCompletionRequestAssistantMessageAudio>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn audio<VALUE: Into<ChatCompletionRequestAssistantMessageAudio>>( &mut self, value: VALUE, ) -> &mut Self
Data about a previous audio response from the model. Learn more.
pub fn tool_calls<VALUE: Into<Vec<ChatCompletionMessageToolCall>>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn function_call<VALUE: Into<FunctionCall>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn function_call<VALUE: Into<FunctionCall>>( &mut self, value: VALUE, ) -> &mut Self
Deprecated and replaced by tool_calls
. The name and arguments of a function that should be called, as generated by the model.
Sourcepub fn build(
&self,
) -> Result<ChatCompletionRequestAssistantMessage, OpenAIError>
pub fn build( &self, ) -> Result<ChatCompletionRequestAssistantMessage, OpenAIError>
Builds a new ChatCompletionRequestAssistantMessage
.
§Errors
If a required field has not been initialized.
Trait Implementations§
Source§impl Clone for ChatCompletionRequestAssistantMessageArgs
impl Clone for ChatCompletionRequestAssistantMessageArgs
Source§fn clone(&self) -> ChatCompletionRequestAssistantMessageArgs
fn clone(&self) -> ChatCompletionRequestAssistantMessageArgs
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 Freeze for ChatCompletionRequestAssistantMessageArgs
impl RefUnwindSafe for ChatCompletionRequestAssistantMessageArgs
impl Send for ChatCompletionRequestAssistantMessageArgs
impl Sync for ChatCompletionRequestAssistantMessageArgs
impl Unpin for ChatCompletionRequestAssistantMessageArgs
impl UnwindSafe for ChatCompletionRequestAssistantMessageArgs
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