pub struct LLMConfig {
pub provider: LLMProviderKind,
pub model: String,
pub api_key: String,
pub base_url: Option<String>,
pub max_tokens: Option<u32>,
pub temperature: Option<f64>,
}Expand description
LLM configuration for AI methods.
Fields§
§provider: LLMProviderKindProvider: OpenAI, Anthropic, or OpenRouter.
model: StringModel name (e.g. “gpt-4o”, “claude-sonnet-4-5-20250929”).
api_key: StringAPI key for the provider.
base_url: Option<String>Base URL override (e.g. for OpenRouter or local vLLM).
max_tokens: Option<u32>Max tokens (default: 4096).
temperature: Option<f64>Temperature (default: 0.1).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LLMConfig
impl<'de> Deserialize<'de> for LLMConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<LLMConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<LLMConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for LLMConfig
impl Serialize for LLMConfig
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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