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 feedback_needed: Option<String>,
33 pub pending_questions: usize,
34 pub active_profile: Option<ActiveProfile>,
37 pub summary: String,
40}
41
42#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
43pub struct ActiveProfile {
44 pub profile_id: i64,
45 pub stage: String,
46}
47
48#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
50pub struct TrainedProfileSummary {
51 pub profile_id: i64,
52 pub model_kind: String,
53 pub promoted: bool,
54}
55
56#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
59pub struct QuestionAnswerOutcome {
60 pub status: String,
61 pub acknowledgement: Option<LearningAcknowledgement>,
62}
63
64#[derive(Serialize, Clone)]
67pub struct PersonData {
68 pub label: String,
70 pub full_name: String,
73 pub face_ids: Vec<i64>,
74 pub representative_id: i64,
75 pub hashes: Vec<String>,
76}
77
78#[derive(Serialize, Clone)]
80pub struct ClusterData {
81 pub cluster_id: i64,
82 pub face_ids: Vec<i64>,
83 pub hashes: Vec<String>,
84}
85
86#[derive(Serialize, Clone)]
88pub struct SingletonData {
89 pub face_id: i64,
90 pub hash: String,
91}
92
93#[derive(Serialize, Clone, Default)]
98pub struct FacesData {
99 pub people: Vec<PersonData>,
100 pub clusters: Vec<ClusterData>,
101 pub singletons: Vec<SingletonData>,
102}
103
104#[derive(Serialize, Clone)]
106pub struct ClusterFaceData {
107 pub face_id: i64,
108 pub hash: String,
109 pub path: String,
110}
111
112#[derive(Serialize, Clone)]
114pub struct ClusterDetail {
115 pub cluster_id: i64,
116 pub faces: Vec<ClusterFaceData>,
117}
118
119#[derive(Serialize, Clone)]
122pub struct PersonFaceData {
123 pub face_id: i64,
124 pub hash: String,
125 pub path: String,
126 pub is_primary: bool,
127}
128
129#[derive(Serialize, Clone)]
131pub struct PersonDetail {
132 pub label: String,
134 pub full_name: String,
136 pub faces: Vec<PersonFaceData>,
137}