pub struct CompletionOptions {
pub model: String,
pub max_tokens: Option<u32>,
pub temperature: Option<f32>,
pub n: Option<u8>,
pub stream: Option<bool>,
pub user: Option<String>,
}Fields§
§model: String§max_tokens: Option<u32>§temperature: Option<f32>§n: Option<u8>How many completions to generate for each prompt.
Note: Because this parameter generates many completions, it can quickly consume your token quota. Use carefully and ensure that you have reasonable settings for max_tokens and stop.
stream: Option<bool>§user: Option<String>A unique identifier representing your end-user, which will help OpenAI to monitor and detect abuse. Learn more.
Trait Implementations§
Source§impl Clone for CompletionOptions
impl Clone for CompletionOptions
Source§fn clone(&self) -> CompletionOptions
fn clone(&self) -> CompletionOptions
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 moreSource§impl Debug for CompletionOptions
impl Debug for CompletionOptions
Source§impl<'de> Deserialize<'de> for CompletionOptions
impl<'de> Deserialize<'de> for CompletionOptions
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CompletionOptions
impl RefUnwindSafe for CompletionOptions
impl Send for CompletionOptions
impl Sync for CompletionOptions
impl Unpin for CompletionOptions
impl UnwindSafe for CompletionOptions
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