Struct async_openai::types::CreateMessageRequestArgs
source · pub struct CreateMessageRequestArgs { /* private fields */ }
Expand description
Builder for CreateMessageRequest
.
Implementations§
source§impl CreateMessageRequestArgs
impl CreateMessageRequestArgs
sourcepub fn role<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn role<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
The role of the entity that is creating the message. Currently only user
is supported.
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 content of the message.
sourcepub fn file_ids<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
pub fn file_ids<VALUE: Into<Vec<String>>>(&mut self, value: VALUE) -> &mut Self
A list of File IDs that the message should use. There can be a maximum of 10 files attached to a message. Useful for tools like retrieval
and code_interpreter
that can access and use files.
pub fn metadata<VALUE: Into<HashMap<String, Value>>>( &mut self, value: VALUE ) -> &mut Self
sourcepub fn build(&self) -> Result<CreateMessageRequest, OpenAIError>
pub fn build(&self) -> Result<CreateMessageRequest, OpenAIError>
Trait Implementations§
source§impl Clone for CreateMessageRequestArgs
impl Clone for CreateMessageRequestArgs
source§fn clone(&self) -> CreateMessageRequestArgs
fn clone(&self) -> CreateMessageRequestArgs
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 moresource§impl Debug for CreateMessageRequestArgs
impl Debug for CreateMessageRequestArgs
Auto Trait Implementations§
impl RefUnwindSafe for CreateMessageRequestArgs
impl Send for CreateMessageRequestArgs
impl Sync for CreateMessageRequestArgs
impl Unpin for CreateMessageRequestArgs
impl UnwindSafe for CreateMessageRequestArgs
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