Add transcription comparison stats
This commit is contained in:
@@ -8,12 +8,13 @@ import (
|
||||
)
|
||||
|
||||
type dashboardResponse struct {
|
||||
At time.Time `json:"at"`
|
||||
Summary dashboardSummary `json:"summary"`
|
||||
Stats *model.Stats `json:"stats"`
|
||||
Providers providersStatusResponse `json:"providers"`
|
||||
Infra infraStatusResponse `json:"infra"`
|
||||
Jobs []*model.JobSummary `json:"jobs"`
|
||||
At time.Time `json:"at"`
|
||||
Summary dashboardSummary `json:"summary"`
|
||||
Stats *model.Stats `json:"stats"`
|
||||
Providers providersStatusResponse `json:"providers"`
|
||||
Infra infraStatusResponse `json:"infra"`
|
||||
TranscriptionComparison []model.TranscriptionComparisonStat `json:"transcription_comparison"`
|
||||
Jobs []*model.JobSummary `json:"jobs"`
|
||||
}
|
||||
|
||||
type dashboardSummary struct {
|
||||
@@ -43,6 +44,11 @@ func (s *Server) handleDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
writeError(w, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
comparison, err := s.store.TranscriptionComparison(ctx)
|
||||
if err != nil {
|
||||
writeError(w, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
|
||||
resp := dashboardResponse{
|
||||
At: now,
|
||||
@@ -57,8 +63,9 @@ func (s *Server) handleDashboard(w http.ResponseWriter, r *http.Request) {
|
||||
s.checkAudioLLM(ctx, "voxtral-small", s.cfg.VoxtralBaseURL, s.cfg.VoxtralAPIKey, s.cfg.VoxtralModel, s.cfg.VoxtralTimeout),
|
||||
},
|
||||
},
|
||||
Infra: loadInfraSnapshot(r, s.cfg),
|
||||
Jobs: jobs,
|
||||
Infra: loadInfraSnapshot(r, s.cfg),
|
||||
TranscriptionComparison: comparison,
|
||||
Jobs: jobs,
|
||||
}
|
||||
writeJSON(w, http.StatusOK, resp)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user