pub struct ChatCompletionRequestAssistantMessageArgs { /* private fields */ }
Expand description
Builder for ChatCompletionRequestAssistantMessage
.
Implementations§
source§impl ChatCompletionRequestAssistantMessageArgs
impl ChatCompletionRequestAssistantMessageArgs
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 assistant 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 assistant
.
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 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