saw-go/proto/tool.go

33 lines
1.1 KiB
Go
Raw Normal View History

2025-03-31 15:36:34 +08:00
package proto
// 基础统计信息,会话数,问答数,用户数,今日处理问答数
type DashBoardStatisticsSt struct {
SessionNum int64 `json:"session_num"`
MessageCount int64 `json:"message_count"`
UserCount int64 `json:"user_count"`
TodayMessageCount int64 `json:"today_message_count"`
}
// 统计过去一周每天的会话数、消息数
type DashBoardStatisticsWeekSt struct {
SessionCount []DashBoardStatisticsWeekCount `json:"session_count"`
MessageCount []DashBoardStatisticsWeekCount `json:"message_count"`
}
type DashBoardStatisticsWeekCount struct {
Count int64 `json:"count"`
}
2025-03-31 15:36:34 +08:00
type DashBoardStatisticsResp struct {
DashBoardStatisticsSt DashBoardStatisticsSt `json:"dashboard_statistics_st"`
DashBoardStatisticsWeekSt DashBoardStatisticsWeekSt `json:"dashboard_statistics_week"`
// 模型的使用统计
DashBoardStatisticsModelSt []MessageModelIDCountSt `json:"dashboard_statistics_model_st"`
}
type MessageModelIDCountSt struct {
ModelID uint `json:"model_id"`
ModelName string `json:"name"`
Count int `json:"value"`
2025-03-31 15:36:34 +08:00
}