pub struct Config {Show 13 fields
pub provider: ModelProvider,
pub name: String,
pub api_key: String,
pub api_url: String,
pub api_version: Option<String>,
pub max_tokens: Option<i64>,
pub n: Option<i64>,
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub top_k: Option<i64>,
pub frequency_penalty: Option<f64>,
pub presence_penalty: Option<f64>,
pub stop_sequence: Option<String>,
}Expand description
Model parameters.
Fields§
§provider: ModelProviderModel name.
name: StringModel name.
api_key: StringAPI key.
api_url: StringModel API URL.
api_version: Option<String>Model API version.
max_tokens: Option<i64>Maximum number of tokens that will be generated.
n: Option<i64>Number of variants to generate.
temperature: Option<f64>Level of randomization when choosing tokens.
top_p: Option<f64>Only the tokens comprising the top_p probability mass will be considered.
top_k: Option<i64>Only k tokens with the most probability will be considered.
frequency_penalty: Option<f64>Penalize new tokens based on their existing frequency.
presence_penalty: Option<f64>Penalize new tokens based on whether they appear in the text so far.
stop_sequence: Option<String>Sequences at which model will stop generating.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnwindSafe for Config
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