pub struct ModelSettingsInner {
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
pub context_size: u32,
pub top_p: Option<f32>,
pub frequency_penalty: Option<f32>,
pub presence_penalty: Option<f32>,
pub provider: ModelProvider,
pub parameters: Option<Value>,
pub response_format: Option<Value>,
}Expand description
Optional/defaultable model parameters. Split from ModelSettings so callers
can construct ModelSettings { model: "...", ..Default::default() } easily
via the inner field having Default.
Fields§
§temperature: Option<f32>§max_tokens: Option<u32>§context_size: u32§top_p: Option<f32>§frequency_penalty: Option<f32>§presence_penalty: Option<f32>§provider: ModelProvider§parameters: Option<Value>Additional parameters for the agent, if any.
response_format: Option<Value>The format of the response, if specified.
Trait Implementations§
Source§impl Clone for ModelSettingsInner
impl Clone for ModelSettingsInner
Source§fn clone(&self) -> ModelSettingsInner
fn clone(&self) -> ModelSettingsInner
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 ModelSettingsInner
impl Debug for ModelSettingsInner
Source§impl Default for ModelSettingsInner
impl Default for ModelSettingsInner
Source§fn default() -> ModelSettingsInner
fn default() -> ModelSettingsInner
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ModelSettingsInner
impl<'de> Deserialize<'de> for ModelSettingsInner
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 ModelSettingsInner
impl JsonSchema for ModelSettingsInner
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 moreAuto Trait Implementations§
impl Freeze for ModelSettingsInner
impl RefUnwindSafe for ModelSettingsInner
impl Send for ModelSettingsInner
impl Sync for ModelSettingsInner
impl Unpin for ModelSettingsInner
impl UnsafeUnpin for ModelSettingsInner
impl UnwindSafe for ModelSettingsInner
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