pub struct ChatCompletionRequestToolMessageArgs { /* private fields */ }
Expand description
Builder for ChatCompletionRequestToolMessage
.
Implementations§
source§impl ChatCompletionRequestToolMessageArgs
impl ChatCompletionRequestToolMessageArgs
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 tool
.
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 tool message.
pub fn tool_call_id<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
sourcepub fn build(&self) -> Result<ChatCompletionRequestToolMessage, OpenAIError>
pub fn build(&self) -> Result<ChatCompletionRequestToolMessage, OpenAIError>
Builds a new ChatCompletionRequestToolMessage
.
§Errors
If a required field has not been initialized.
Trait Implementations§
source§impl Clone for ChatCompletionRequestToolMessageArgs
impl Clone for ChatCompletionRequestToolMessageArgs
source§fn clone(&self) -> ChatCompletionRequestToolMessageArgs
fn clone(&self) -> ChatCompletionRequestToolMessageArgs
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 ChatCompletionRequestToolMessageArgs
impl Send for ChatCompletionRequestToolMessageArgs
impl Sync for ChatCompletionRequestToolMessageArgs
impl Unpin for ChatCompletionRequestToolMessageArgs
impl UnwindSafe for ChatCompletionRequestToolMessageArgs
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