pub struct ModelSettings {
pub model: String,
pub temperature: f32,
pub max_tokens: u32,
pub context_size: u32,
pub top_p: f32,
pub frequency_penalty: f32,
pub presence_penalty: f32,
pub provider: ModelProvider,
pub parameters: Option<Value>,
pub response_format: Option<Value>,
}Expand description
Model settings configuration
Fields§
§model: String§temperature: f32§max_tokens: u32§context_size: u32§top_p: f32§frequency_penalty: f32§presence_penalty: 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 ModelSettings
impl Clone for ModelSettings
Source§fn clone(&self) -> ModelSettings
fn clone(&self) -> ModelSettings
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 ModelSettings
impl Debug for ModelSettings
Source§impl Default for ModelSettings
impl Default for ModelSettings
Source§impl<'de> Deserialize<'de> for ModelSettings
impl<'de> Deserialize<'de> for ModelSettings
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 ModelSettings
impl JsonSchema for ModelSettings
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 ModelSettings
impl RefUnwindSafe for ModelSettings
impl Send for ModelSettings
impl Sync for ModelSettings
impl Unpin for ModelSettings
impl UnwindSafe for ModelSettings
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