pub struct GenerationDefaults {
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<usize>,
pub max_tokens: Option<usize>,
pub context_window: Option<usize>,
}Expand description
Generation parameter defaults from the model’s generation_config.json, served via the model status RPC. All fields are Option — None means “model has no opinion, use server default.” Adjusting a None field via the settings UI promotes it to Some.
Fields§
§temperature: Option<f32>§top_p: Option<f32>§top_k: Option<usize>§max_tokens: Option<usize>§context_window: Option<usize>Implementations§
Source§impl GenerationDefaults
impl GenerationDefaults
Sourcepub const NUM_FIELDS: usize = 5
pub const NUM_FIELDS: usize = 5
Number of user-adjustable fields in the pre-chat settings modal. Must match the fields array in render.rs and the match arms in apply_gen_field_delta.
Trait Implementations§
Source§impl Clone for GenerationDefaults
impl Clone for GenerationDefaults
Source§fn clone(&self) -> GenerationDefaults
fn clone(&self) -> GenerationDefaults
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 GenerationDefaults
impl Debug for GenerationDefaults
Source§impl Default for GenerationDefaults
impl Default for GenerationDefaults
Source§fn default() -> GenerationDefaults
fn default() -> GenerationDefaults
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for GenerationDefaults
impl<'de> Deserialize<'de> for GenerationDefaults
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 GenerationDefaults
impl RefUnwindSafe for GenerationDefaults
impl Send for GenerationDefaults
impl Sync for GenerationDefaults
impl Unpin for GenerationDefaults
impl UnsafeUnpin for GenerationDefaults
impl UnwindSafe for GenerationDefaults
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more