using FreeRedis; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using VideoAnalysisCore.Enum; using VideoAnalysisCore.Model.Dto; namespace VideoAnalysisCore.AICore.ChatGPT.Dto { /// /// 任务结果 /// public class TaskRes { public TaskRes() { } public TaskRes(TotalCaptionsDto captions) { this.TeacherSpeaking = captions.TeacherSpeaking; this.TimeBase = captions.TimeBase; this.StudentSpeaking = captions.StudentSpeaking; } /// /// 教师发言时间 /// /// public decimal TeacherSpeaking { get; set; } = 0; /// /// 学生发言时间 /// /// public decimal StudentSpeaking { get; set; } = 0; /// /// 高频词汇 从高到低 /// public string[] Hotwords { get; set; } /// /// 教师提问类型 /// public Dictionary? QuestionType { get; set; } /// /// 时间段概览 /// public IEnumerable? TimeOverview { get; set; } /// /// 视频时间轴 /// public IEnumerable? TimeBase { get; set; } /// /// GPT模型id /// public string GPTModel { get; set; } = string.Empty; /// /// AI综合评估 /// public AssessmentDto Assessment { get; set; } = default!; /// /// AI综合评估得分 /// 满分100 /// public float AssessmentScore => (float)( (Assessment?.Bad?.Sum(x => x.Score) ?? 0) + (Assessment?.Merit?.Sum(x => x.Score) ?? 0)); //(float)Math.Round((Assessment?.Bad?.Select(x => x.Score) //.Concat(Assessment?.Merit?.Select(s => s.Score) ?? []) //.Average() ?? 0) * 10,2); } }