pub struct LlmConfig {
pub url: String,
pub model: String,
pub api_key: Option<String>,
pub headers: HashMap<String, String>,
pub timeout: Duration,
pub temperature: f64,
pub thinking: Option<bool>,
pub model_params: HashMap<String, Value>,
}Expand description
Configuration for the LLM client — bundles URL, model, auth, timeouts, and provider-specific options into a single struct passed everywhere.
Fields§
§url: StringOpenAI-compatible API base URL (without trailing /v1/…).
model: StringModel name (e.g. gpt-4o-mini, deepseek).
api_key: Option<String>API key sent as Authorization: Bearer <key>.
headers: HashMap<String, String>Custom headers appended to every LLM request.
timeout: DurationHTTP timeout.
temperature: f64Sampling temperature (0.0–1.0).
thinking: Option<bool>Enable extended thinking / reasoning tokens.
None = don’t send any thinking key (provider default).
model_params: HashMap<String, Value>Provider-specific parameters merged into the request body
(e.g. effort = "high" for Anthropic).
Implementations§
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