pub struct AiConfig;Expand description
Zero-sized marker for the environment-driven client factory.
All functionality is in the associated function AiConfig::from_env.
Implementations§
Source§impl AiConfig
impl AiConfig
Sourcepub fn from_env() -> Result<Box<dyn LlmClient>, Error>
pub fn from_env() -> Result<Box<dyn LlmClient>, Error>
Construct the configured LLM client from environment variables.
Reads FERRO_AI_PROVIDER (default "anthropic"), FERRO_AI_MODEL,
FERRO_AI_API_KEY, and FERRO_AI_BASE_URL. Returns
Err(Error::Config) if the provider is unknown or a required key is
missing — fail-fast at startup, not on the first call (D-06).
§Provider strings
"anthropic"—AnthropicClient; requiresFERRO_AI_API_KEY(orANTHROPIC_API_KEYfallback)"openai"—OpenAiClient; requiresFERRO_AI_API_KEY"groq"—OpenAiClientwith Groq base URL; requiresFERRO_AI_API_KEY"ollama"—OllamaClient; no key needed
Auto Trait Implementations§
impl Freeze for AiConfig
impl RefUnwindSafe for AiConfig
impl Send for AiConfig
impl Sync for AiConfig
impl Unpin for AiConfig
impl UnsafeUnpin for AiConfig
impl UnwindSafe for AiConfig
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