pub struct CreateCompletionRequestArgs { /* private fields */ }Expand description
Builder for CreateCompletionRequest.
Implementations§
Source§impl CreateCompletionRequestArgs
impl CreateCompletionRequestArgs
pub fn model<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn prompt<VALUE: Into<Prompt>>(&mut self, value: VALUE) -> &mut Self
Sourcepub fn prompt_embeds<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn prompt_embeds<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
Base64-encoded PyTorch tensor containing pre-computed embeddings. At least one of prompt or prompt_embeds is required.
pub fn suffix<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn max_tokens<VALUE: Into<u32>>(&mut self, value: VALUE) -> &mut Self
pub fn temperature<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
pub fn top_p<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
pub fn n<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
pub fn stream<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn stream_options<VALUE: Into<ChatCompletionStreamOptions>>( &mut self, value: VALUE, ) -> &mut Self
pub fn logprobs<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
Sourcepub fn echo<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn echo<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Echo back the prompt in addition to the completion. Strict bool validation – rejects integers and strings.
pub fn stop<VALUE: Into<Stop>>(&mut self, value: VALUE) -> &mut Self
pub fn presence_penalty<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
pub fn frequency_penalty<VALUE: Into<f32>>(&mut self, value: VALUE) -> &mut Self
pub fn best_of<VALUE: Into<u8>>(&mut self, value: VALUE) -> &mut Self
pub fn logit_bias<VALUE: Into<HashMap<String, Value>>>( &mut self, value: VALUE, ) -> &mut Self
pub fn user<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self
pub fn seed<VALUE: Into<i64>>(&mut self, value: VALUE) -> &mut Self
Sourcepub fn build(&self) -> Result<CreateCompletionRequest, OpenAIError>
pub fn build(&self) -> Result<CreateCompletionRequest, OpenAIError>
Trait Implementations§
Source§impl Clone for CreateCompletionRequestArgs
impl Clone for CreateCompletionRequestArgs
Source§fn clone(&self) -> CreateCompletionRequestArgs
fn clone(&self) -> CreateCompletionRequestArgs
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CreateCompletionRequestArgs
impl Debug for CreateCompletionRequestArgs
Auto Trait Implementations§
impl Freeze for CreateCompletionRequestArgs
impl RefUnwindSafe for CreateCompletionRequestArgs
impl Send for CreateCompletionRequestArgs
impl Sync for CreateCompletionRequestArgs
impl Unpin for CreateCompletionRequestArgs
impl UnsafeUnpin for CreateCompletionRequestArgs
impl UnwindSafe for CreateCompletionRequestArgs
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