pub struct EasyInputMessageArgs { /* private fields */ }Expand description
Builder for EasyInputMessage.
Implementations§
Source§impl EasyInputMessageArgs
impl EasyInputMessageArgs
Sourcepub fn type<VALUE: Into<MessageType>>(&mut self, value: VALUE) -> &mut Self
pub fn type<VALUE: Into<MessageType>>(&mut self, value: VALUE) -> &mut Self
The type of the message input. Always set to 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 message input. One of user, assistant, system, or developer.
Sourcepub fn content<VALUE: Into<EasyInputContent>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn content<VALUE: Into<EasyInputContent>>( &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<EasyInputMessage, OpenAIError>
pub fn build(&self) -> Result<EasyInputMessage, OpenAIError>
Trait Implementations§
Source§impl Clone for EasyInputMessageArgs
impl Clone for EasyInputMessageArgs
Source§fn clone(&self) -> EasyInputMessageArgs
fn clone(&self) -> EasyInputMessageArgs
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 EasyInputMessageArgs
impl RefUnwindSafe for EasyInputMessageArgs
impl Send for EasyInputMessageArgs
impl Sync for EasyInputMessageArgs
impl Unpin for EasyInputMessageArgs
impl UnwindSafe for EasyInputMessageArgs
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