use serde::{Deserialize, Serialize};
#[derive(Debug, Clone)]
pub struct ClientConfig {
pub api_key: String,
pub timeout_secs: u64,
}
impl Default for ClientConfig {
fn default() -> Self {
Self {
api_key: String::new(),
timeout_secs: 30,
}
}
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Message {
pub role: String,
pub content: String,
}
impl Message {
pub fn new(role: impl Into<String>, content: impl Into<String>) -> Self {
Self {
role: role.into(),
content: content.into(),
}
}
}