pub struct Base {
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub stream: bool,
pub n: Option<usize>,
pub user: String,
pub max_tokens: Option<usize>,
}Expand description
OpenAI Chat Completion API
Fields§
§temperature: Option<f64>What sampling temperature to use.
top_p: Option<f64>An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass.
stream: boolIf set, the server will stream back partial progress.
n: Option<usize>How many completions to generate for each prompt.
user: StringUser ID to associate with the request.
max_tokens: Option<usize>The maximum number of tokens to generate.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Base
impl<'de> Deserialize<'de> for Base
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 Base
impl RefUnwindSafe for Base
impl Send for Base
impl Sync for Base
impl Unpin for Base
impl UnsafeUnpin for Base
impl UnwindSafe for Base
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