1use serde::Serialize;
2
3#[derive(Debug, Clone, PartialEq, Eq)]
5pub struct TeachingContext {
6 pub embedding_model_id: String,
7 pub active_profile_id: Option<i64>,
8}
9
10#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
12pub struct LearningAcknowledgement {
13 pub generation: u64,
14 pub event_ids: Vec<i64>,
15 pub message_key: String,
16}
17
18#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
20pub struct FaceLearningStatus {
21 pub generation: u64,
22 pub trained_generation: u64,
23 pub status: String,
24 pub last_profile_id: Option<i64>,
25 pub last_candidate: Option<String>,
29 pub last_error: Option<String>,
30 pub pending_questions: usize,
31}
32
33#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
35pub struct TrainedProfileSummary {
36 pub profile_id: i64,
37 pub model_kind: String,
38 pub promoted: bool,
39}
40
41#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
44pub struct QuestionAnswerOutcome {
45 pub status: String,
46 pub acknowledgement: Option<LearningAcknowledgement>,
47}
48
49#[derive(Serialize, Clone)]
52pub struct PersonData {
53 pub label: String,
55 pub full_name: String,
58 pub face_ids: Vec<i64>,
59 pub representative_id: i64,
60 pub hashes: Vec<String>,
61}
62
63#[derive(Serialize, Clone)]
65pub struct ClusterData {
66 pub cluster_id: i64,
67 pub face_ids: Vec<i64>,
68 pub hashes: Vec<String>,
69}
70
71#[derive(Serialize, Clone)]
73pub struct SingletonData {
74 pub face_id: i64,
75 pub hash: String,
76}
77
78#[derive(Serialize, Clone, Default)]
83pub struct FacesData {
84 pub people: Vec<PersonData>,
85 pub clusters: Vec<ClusterData>,
86 pub singletons: Vec<SingletonData>,
87}
88
89#[derive(Serialize, Clone)]
91pub struct ClusterFaceData {
92 pub face_id: i64,
93 pub hash: String,
94 pub path: String,
95}
96
97#[derive(Serialize, Clone)]
99pub struct ClusterDetail {
100 pub cluster_id: i64,
101 pub faces: Vec<ClusterFaceData>,
102}
103
104#[derive(Serialize, Clone)]
107pub struct PersonFaceData {
108 pub face_id: i64,
109 pub hash: String,
110 pub path: String,
111 pub is_primary: bool,
112}
113
114#[derive(Serialize, Clone)]
116pub struct PersonDetail {
117 pub label: String,
119 pub full_name: String,
121 pub faces: Vec<PersonFaceData>,
122}