pub struct SamplingParameters {
pub temperature: Option<f32>,
pub top_p: Option<f32>,
pub top_k: Option<u32>,
}Fields§
§temperature: Option<f32>§top_p: Option<f32>§top_k: Option<u32>Implementations§
Source§impl SamplingParameters
impl SamplingParameters
pub const fn new() -> Self
pub const fn with_temperature(self, temperature: f32) -> Self
pub const fn with_top_p(self, top_p: f32) -> Self
pub const fn with_top_k(self, top_k: u32) -> Self
Trait Implementations§
Source§impl Clone for SamplingParameters
impl Clone for SamplingParameters
Source§fn clone(&self) -> SamplingParameters
fn clone(&self) -> SamplingParameters
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 SamplingParameters
impl Debug for SamplingParameters
Source§impl Default for SamplingParameters
impl Default for SamplingParameters
Source§impl<'de> Deserialize<'de> for SamplingParameters
impl<'de> Deserialize<'de> for SamplingParameters
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
Source§impl Serialize for SamplingParameters
impl Serialize for SamplingParameters
impl Copy for SamplingParameters
Auto Trait Implementations§
impl Freeze for SamplingParameters
impl RefUnwindSafe for SamplingParameters
impl Send for SamplingParameters
impl Sync for SamplingParameters
impl Unpin for SamplingParameters
impl UnwindSafe for SamplingParameters
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