pub struct LlmConfig {
pub provider: String,
pub model: String,
pub api_key: SecretString,
pub base_url: Option<String>,
pub retry_config: Option<RetryConfig>,
pub temperature: Option<f32>,
pub max_tokens: Option<usize>,
pub thinking_budget: Option<usize>,
}Expand description
LLM client configuration
Fields§
§provider: String§model: String§api_key: SecretString§base_url: Option<String>§retry_config: Option<RetryConfig>§temperature: Option<f32>Sampling temperature (0.0–1.0). None uses the provider default.
max_tokens: Option<usize>Maximum tokens to generate. None uses the client default.
thinking_budget: Option<usize>Extended thinking budget in tokens (Anthropic only).
Implementations§
Source§impl LlmConfig
impl LlmConfig
pub fn new( provider: impl Into<String>, model: impl Into<String>, api_key: impl Into<String>, ) -> Self
pub fn with_base_url(self, base_url: impl Into<String>) -> Self
pub fn with_retry_config(self, retry_config: RetryConfig) -> Self
pub fn with_temperature(self, temperature: f32) -> Self
pub fn with_max_tokens(self, max_tokens: usize) -> Self
pub fn with_thinking_budget(self, budget: usize) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LlmConfig
impl RefUnwindSafe for LlmConfig
impl Send for LlmConfig
impl Sync for LlmConfig
impl Unpin for LlmConfig
impl UnsafeUnpin for LlmConfig
impl UnwindSafe for LlmConfig
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