pub struct ModelConfig {
pub model_id: Option<String>,
pub temperature: Option<f32>,
pub max_tokens: Option<u32>,
pub system_prompt: Option<String>,
pub extra: HashMap<String, Value>,
}
Fieldsยง
ยงmodel_id: Option<String>
ยงtemperature: Option<f32>
ยงmax_tokens: Option<u32>
ยงsystem_prompt: Option<String>
ยงextra: HashMap<String, Value>
Implementationsยง
Sourceยงimpl ModelConfig
impl ModelConfig
pub fn new() -> Self
pub fn merge(&self, other: &ModelConfig) -> ModelConfig
pub fn with_temperature(self, temp: f32) -> Self
pub fn with_system_prompt(self, prompt: impl Into<String>) -> Self
pub fn with_max_tokens(self, tokens: u32) -> Self
Trait Implementationsยง
Sourceยงimpl Clone for ModelConfig
impl Clone for ModelConfig
Sourceยงfn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
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 ModelConfig
impl Debug for ModelConfig
Auto Trait Implementationsยง
impl Freeze for ModelConfig
impl RefUnwindSafe for ModelConfig
impl Send for ModelConfig
impl Sync for ModelConfig
impl Unpin for ModelConfig
impl UnwindSafe for ModelConfig
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