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}
35
36#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
38pub struct TrainedProfileSummary {
39 pub profile_id: i64,
40 pub model_kind: String,
41 pub promoted: bool,
42}
43
44#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
47pub struct QuestionAnswerOutcome {
48 pub status: String,
49 pub acknowledgement: Option<LearningAcknowledgement>,
50}
51
52#[derive(Serialize, Clone)]
55pub struct PersonData {
56 pub label: String,
58 pub full_name: String,
61 pub face_ids: Vec<i64>,
62 pub representative_id: i64,
63 pub hashes: Vec<String>,
64}
65
66#[derive(Serialize, Clone)]
68pub struct ClusterData {
69 pub cluster_id: i64,
70 pub face_ids: Vec<i64>,
71 pub hashes: Vec<String>,
72}
73
74#[derive(Serialize, Clone)]
76pub struct SingletonData {
77 pub face_id: i64,
78 pub hash: String,
79}
80
81#[derive(Serialize, Clone, Default)]
86pub struct FacesData {
87 pub people: Vec<PersonData>,
88 pub clusters: Vec<ClusterData>,
89 pub singletons: Vec<SingletonData>,
90}
91
92#[derive(Serialize, Clone)]
94pub struct ClusterFaceData {
95 pub face_id: i64,
96 pub hash: String,
97 pub path: String,
98}
99
100#[derive(Serialize, Clone)]
102pub struct ClusterDetail {
103 pub cluster_id: i64,
104 pub faces: Vec<ClusterFaceData>,
105}
106
107#[derive(Serialize, Clone)]
110pub struct PersonFaceData {
111 pub face_id: i64,
112 pub hash: String,
113 pub path: String,
114 pub is_primary: bool,
115}
116
117#[derive(Serialize, Clone)]
119pub struct PersonDetail {
120 pub label: String,
122 pub full_name: String,
124 pub faces: Vec<PersonFaceData>,
125}