pub struct SamplingParams {
pub max_completion_tokens: Option<i64>,
pub reasoning_effort: Option<Value>,
pub response_format: Option<SamplingParamsResponseFormat>,
pub seed: Option<i64>,
pub temperature: Option<f64>,
pub tools: Option<Vec<Value>>,
pub top_p: Option<f64>,
}Fields§
§max_completion_tokens: Option<i64>The maximum number of tokens in the generated output.
reasoning_effort: Option<Value>Constrains effort on reasoning for
response_format: Option<SamplingParamsResponseFormat>An object specifying the format that the model must output.
seed: Option<i64>A seed value to initialize the randomness, during sampling.
temperature: Option<f64>A higher temperature increases randomness in the outputs.
tools: Option<Vec<Value>>A list of tools the model may call.
top_p: Option<f64>An alternative to temperature for nucleus sampling; 1.0 includes all tokens.
Trait Implementations§
Source§impl Clone for SamplingParams
impl Clone for SamplingParams
Source§fn clone(&self) -> SamplingParams
fn clone(&self) -> SamplingParams
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 SamplingParams
impl Debug for SamplingParams
Source§impl<'de> Deserialize<'de> for SamplingParams
impl<'de> Deserialize<'de> for SamplingParams
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 SamplingParams
impl RefUnwindSafe for SamplingParams
impl Send for SamplingParams
impl Sync for SamplingParams
impl Unpin for SamplingParams
impl UnsafeUnpin for SamplingParams
impl UnwindSafe for SamplingParams
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