use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Default)]
pub struct Conversation {
pub seq: String,
pub id: String,
pub title: String,
#[serde(default)]
pub agent_id: String,
pub created_at: String,
pub updated_at: String,
}
#[derive(Debug, Serialize)]
pub struct ConversationCreateRequest {
pub title: String,
#[serde(skip_serializing_if = "Option::is_none")]
pub agent_id: Option<String>,
}
#[derive(Debug, Default, Serialize)]
pub struct ConversationUpdateRequest {
#[serde(skip_serializing_if = "Option::is_none")]
pub title: Option<String>,
}
#[derive(Debug, Clone, Deserialize, Default)]
pub struct Message {
pub seq: i64,
pub id: String,
pub role: String,
pub content: String,
#[serde(default)]
pub tool_calls: Vec<ToolCall>,
}
#[derive(Debug, Clone, Deserialize, Default)]
pub struct ToolCall {
pub id: String,
pub name: String,
pub args: serde_json::Value,
}
#[derive(Debug, Clone, Deserialize)]
pub struct PageResult<T> {
pub items: Vec<T>,
pub has_more: bool,
}