pub struct SearchOptions {
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<i32>,
pub max_output_tokens: Option<i32>,
pub frequency_penalty: Option<f32>,
pub presence_penalty: Option<f32>,
pub seed: Option<i64>,
pub early_stopping: Option<bool>,
pub do_sample: Option<bool>,
}Expand description
Sampling / decoding parameters applied to a request or session.
Every field is optional; unset fields leave the model/engine default in place.
Fields§
§temperature: Option<f32>Sampling temperature (higher = more random).
top_p: Option<f32>Nucleus-sampling probability mass in (0, 1].
top_k: Option<i32>Top-k sampling cutoff.
max_output_tokens: Option<i32>Maximum number of tokens to generate.
frequency_penalty: Option<f32>Frequency penalty in [-2.0, 2.0].
presence_penalty: Option<f32>Presence penalty in [-2.0, 2.0].
seed: Option<i64>Random seed for reproducible sampling.
early_stopping: Option<bool>Stop as soon as a stop-sequence is matched.
do_sample: Option<bool>Whether to sample (false = greedy decoding).
Trait Implementations§
Source§impl Clone for SearchOptions
impl Clone for SearchOptions
Source§fn clone(&self) -> SearchOptions
fn clone(&self) -> SearchOptions
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 SearchOptions
impl Debug for SearchOptions
Source§impl Default for SearchOptions
impl Default for SearchOptions
Source§fn default() -> SearchOptions
fn default() -> SearchOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for SearchOptions
impl PartialEq for SearchOptions
impl StructuralPartialEq for SearchOptions
Auto Trait Implementations§
impl Freeze for SearchOptions
impl RefUnwindSafe for SearchOptions
impl Send for SearchOptions
impl Sync for SearchOptions
impl Unpin for SearchOptions
impl UnsafeUnpin for SearchOptions
impl UnwindSafe for SearchOptions
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