openai_agents_rust/config/
schema.rs1use serde::{Deserialize, Serialize};
2use std::path::PathBuf;
3
4#[derive(Debug, Clone, Deserialize, Serialize)]
6pub struct Config {
7 #[serde(default)]
9 pub api_key: String,
10 pub model: String,
12 pub base_url: String,
14 pub log_level: String,
16 #[serde(default = "default_plugins_path")]
18 pub plugins_path: PathBuf,
19 #[serde(default)]
21 pub max_concurrent_requests: Option<usize>,
22}
23
24pub(crate) fn default_plugins_path() -> PathBuf {
25 dirs::home_dir()
26 .unwrap_or_else(|| PathBuf::from("."))
27 .join(".config")
28 .join("openai_agents")
29 .join("plugins")
30}