pub struct ExtendedModelConfig {
pub api_key: Option<String>,
pub base_url: Option<String>,
pub timeout: Option<Duration>,
pub enable_thinking: bool,
pub thinking_budget: Option<u64>,
pub reasoning_effort: Option<String>,
}Expand description
Extended configuration options for model building.
This struct allows configuring advanced model features like extended thinking for Claude models, reasoning effort for OpenAI o1/o3, etc.
Fields§
§api_key: Option<String>API key (overrides environment variable)
base_url: Option<String>Base URL for custom endpoints
timeout: Option<Duration>Request timeout
enable_thinking: boolEnable extended thinking (Anthropic Claude)
thinking_budget: Option<u64>Budget for thinking tokens (Anthropic Claude)
reasoning_effort: Option<String>Reasoning effort (OpenAI o1/o3)
Implementations§
Source§impl ExtendedModelConfig
impl ExtendedModelConfig
Sourcepub fn new() -> ExtendedModelConfig
pub fn new() -> ExtendedModelConfig
Create a new empty config
Sourcepub fn with_api_key(self, key: impl Into<String>) -> ExtendedModelConfig
pub fn with_api_key(self, key: impl Into<String>) -> ExtendedModelConfig
Set API key
Sourcepub fn with_base_url(self, url: impl Into<String>) -> ExtendedModelConfig
pub fn with_base_url(self, url: impl Into<String>) -> ExtendedModelConfig
Set base URL
Sourcepub fn with_timeout(self, timeout: Duration) -> ExtendedModelConfig
pub fn with_timeout(self, timeout: Duration) -> ExtendedModelConfig
Set timeout
Sourcepub fn with_thinking(self, budget: Option<u64>) -> ExtendedModelConfig
pub fn with_thinking(self, budget: Option<u64>) -> ExtendedModelConfig
Enable extended thinking with optional budget
Sourcepub fn with_reasoning_effort(
self,
effort: impl Into<String>,
) -> ExtendedModelConfig
pub fn with_reasoning_effort( self, effort: impl Into<String>, ) -> ExtendedModelConfig
Set reasoning effort for OpenAI o1/o3 models
Trait Implementations§
Source§impl Clone for ExtendedModelConfig
impl Clone for ExtendedModelConfig
Source§fn clone(&self) -> ExtendedModelConfig
fn clone(&self) -> ExtendedModelConfig
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 ExtendedModelConfig
impl Debug for ExtendedModelConfig
Source§impl Default for ExtendedModelConfig
impl Default for ExtendedModelConfig
Source§fn default() -> ExtendedModelConfig
fn default() -> ExtendedModelConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ExtendedModelConfig
impl RefUnwindSafe for ExtendedModelConfig
impl Send for ExtendedModelConfig
impl Sync for ExtendedModelConfig
impl Unpin for ExtendedModelConfig
impl UnwindSafe for ExtendedModelConfig
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