llmrix_rust_sdk/model/
conversation.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, Deserialize, Default)]
5pub struct Conversation {
6 pub seq: String,
7 pub id: String,
8 pub title: String,
9 #[serde(default)]
10 pub agent_id: String,
11 pub created_at: String,
12 pub updated_at: String,
13}
14
15#[derive(Debug, Serialize)]
17pub struct ConversationCreateRequest {
18 pub title: String,
19 #[serde(skip_serializing_if = "Option::is_none")]
20 pub agent_id: Option<String>,
21}
22
23#[derive(Debug, Default, Serialize)]
25pub struct ConversationUpdateRequest {
26 #[serde(skip_serializing_if = "Option::is_none")]
27 pub title: Option<String>,
28}
29
30#[derive(Debug, Clone, Deserialize, Default)]
32pub struct Message {
33 pub seq: i64,
34 pub id: String,
35 pub role: String,
37 pub content: String,
38 #[serde(default)]
39 pub tool_calls: Vec<ToolCall>,
40}
41
42#[derive(Debug, Clone, Deserialize, Default)]
44pub struct ToolCall {
45 pub id: String,
46 pub name: String,
47 pub args: serde_json::Value,
48}
49
50#[derive(Debug, Clone, Deserialize)]
52pub struct PageResult<T> {
53 pub items: Vec<T>,
54 pub has_more: bool,
55}