pub struct Generation {
pub temperature: Option<f64>,
pub top_p: Option<f64>,
pub top_k: Option<u32>,
pub max_tokens: Option<u64>,
pub seed: Option<i64>,
pub n: Option<u32>,
pub stop: Vec<String>,
pub reasoning: Option<Reasoning>,
pub ext: Ext,
}Expand description
Sampling parameters.
Fields§
§temperature: Option<f64>Sampling temperature.
top_p: Option<f64>Nucleus sampling threshold.
top_k: Option<u32>Top-k sampling cutoff.
max_tokens: Option<u64>Maximum tokens generated per response.
seed: Option<i64>Sampling seed.
n: Option<u32>Number of completions requested per prompt.
stop: Vec<String>Stop sequences.
reasoning: Option<Reasoning>Reasoning (extended thinking) settings.
ext: ExtExtensions keyed by namespace; not fingerprinted unless registered.
Trait Implementations§
Source§impl Clone for Generation
impl Clone for Generation
Source§impl Debug for Generation
impl Debug for Generation
Source§impl Default for Generation
impl Default for Generation
Source§impl<'de> Deserialize<'de> for Generation
impl<'de> Deserialize<'de> for Generation
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 JsonSchema for Generation
impl JsonSchema for Generation
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreSource§impl PartialEq for Generation
impl PartialEq for Generation
Source§impl Serialize for Generation
impl Serialize for Generation
impl StructuralPartialEq for Generation
Auto Trait Implementations§
impl Freeze for Generation
impl RefUnwindSafe for Generation
impl Send for Generation
impl Sync for Generation
impl Unpin for Generation
impl UnsafeUnpin for Generation
impl UnwindSafe for Generation
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