1#[derive(Debug, Clone)]
6pub struct AgentTool {
7 pub name: String,
8 pub description: String,
9 pub parameters: serde_json::Value,
10}
11
12#[derive(Clone)]
14pub struct AgentDef {
15 pub name: String,
16 pub model: String,
17 pub system_prompt: Option<String>,
18 pub tools: Vec<AgentTool>,
19 pub max_turns: u32,
20 pub temperature: Option<f64>,
21 pub max_tokens: Option<u32>,
22 pub base_url: Option<String>,
23 pub api_key: Option<String>,
24 pub output_format: Option<String>,
25}
26
27impl std::fmt::Debug for AgentDef {
28 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
29 f.debug_struct("AgentDef")
30 .field("name", &self.name)
31 .field("model", &self.model)
32 .field("system_prompt", &self.system_prompt)
33 .field("tools", &self.tools)
34 .field("max_turns", &self.max_turns)
35 .field("temperature", &self.temperature)
36 .field("max_tokens", &self.max_tokens)
37 .field("base_url", &self.base_url)
38 .field(
39 "api_key",
40 &if self.api_key.is_some() {
41 "***".to_string()
42 } else {
43 "None".to_string()
44 },
45 )
46 .finish()
47 }
48}