use std::collections::HashMap;
#[derive(Debug, Clone)]
pub struct ApiRequest {
pub model: String,
pub messages: Vec<Message>,
pub max_tokens: u32,
pub system: Option<String>,
pub temperature: Option<f32>,
pub tools: Option<Vec<Tool>>,
}
#[derive(Debug, Clone)]
pub struct Message {
pub role: Role,
pub content: Vec<ContentBlock>,
}
#[derive(Debug, Clone)]
pub enum Role {
User,
Assistant,
System,
}
#[derive(Debug, Clone)]
pub enum ContentBlock {
Text(String),
ToolUse(ToolUse),
ToolResult(ToolResult),
}
#[derive(Debug, Clone)]
pub struct ToolUse {
pub id: String,
pub name: String,
pub input: HashMap<String, serde_json::Value>,
}
#[derive(Debug, Clone)]
pub struct ToolResult {
pub tool_use_id: String,
pub content: String,
pub is_error: bool,
was_persisted: None,
}
#[derive(Debug, Clone)]
pub struct Tool {
pub name: String,
pub description: String,
pub input_schema: serde_json::Value,
}