pub struct InputMessageBuilder { /* private fields */ }
Expand description
Builder for InputMessage
.
Implementations§
Source§impl InputMessageBuilder
impl InputMessageBuilder
pub fn kind<VALUE: Into<InputMessageType>>(&mut self, value: VALUE) -> &mut Self
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 message input.
Sourcepub fn content<VALUE: Into<InputContent>>(&mut self, value: VALUE) -> &mut Self
pub fn content<VALUE: Into<InputContent>>(&mut self, value: VALUE) -> &mut Self
Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses.
Sourcepub fn build(&self) -> Result<InputMessage, OpenAIError>
pub fn build(&self) -> Result<InputMessage, OpenAIError>
Trait Implementations§
Source§impl Clone for InputMessageBuilder
impl Clone for InputMessageBuilder
Source§fn clone(&self) -> InputMessageBuilder
fn clone(&self) -> InputMessageBuilder
Returns a duplicate 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 InputMessageBuilder
impl RefUnwindSafe for InputMessageBuilder
impl Send for InputMessageBuilder
impl Sync for InputMessageBuilder
impl Unpin for InputMessageBuilder
impl UnwindSafe for InputMessageBuilder
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