// crates/nazarick/src/config.rs use std::collections::HashMap; use serde::Deserialize; use crate::chat::types::AgentChatConfig; #[derive(Debug, Deserialize)] pub struct NazarickConfig { pub chat: ChatConfig, pub models: HashMap, } #[derive(Debug, Deserialize, Clone)] pub struct ModelConfig { pub provider: String, pub url: String, pub model: String, pub api_key: Option, pub max_summary_tokens: Option, /// "tool_use" | "xml" — default xml wenn nicht gesetzt pub skill_format: Option, } #[derive(Debug, Deserialize)] pub struct ChatConfig { pub listen_port: u16, pub admin_user_id: u64, pub admin_webhook_url: String, pub agents: Vec, } pub fn load() -> anyhow::Result { let content = std::fs::read_to_string("config/config.toml")?; let config = toml::from_str(&content)?; Ok(config) }