1use std::path::PathBuf;
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
6pub struct StatusResponse {
7 pub spaces: Vec<SpaceStatus>,
8 pub models: ModelStatus,
9 pub cache_dir: PathBuf,
10 pub config_dir: PathBuf,
11 pub total_documents: usize,
12 pub total_chunks: usize,
13 pub total_embedded: usize,
14 pub disk_usage: DiskUsage,
15}
16
17#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
18pub struct SpaceStatus {
19 pub name: String,
20 pub description: Option<String>,
21 pub collections: Vec<CollectionStatus>,
22 pub last_updated: Option<String>,
23}
24
25#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
26pub struct CollectionStatus {
27 pub name: String,
28 pub path: PathBuf,
29 pub documents: usize,
30 pub active_documents: usize,
31 pub chunks: usize,
32 pub embedded_chunks: usize,
33 pub last_updated: String,
34}
35
36#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
37pub struct ModelStatus {
38 pub embedder: ModelInfo,
39 pub reranker: ModelInfo,
40 pub expander: ModelInfo,
41}
42
43#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
44pub struct ModelInfo {
45 pub configured: bool,
46 pub ready: bool,
47 pub profile: Option<String>,
48 pub kind: Option<String>,
49 pub operation: Option<String>,
50 pub model: Option<String>,
51 pub endpoint: Option<String>,
52 pub issue: Option<String>,
53}
54
55#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
56pub struct DiskUsage {
57 pub sqlite_bytes: u64,
58 pub tantivy_bytes: u64,
59 pub usearch_bytes: u64,
60 pub models_bytes: u64,
61 pub total_bytes: u64,
62}