74 lines
2.2 KiB
C#
74 lines
2.2 KiB
C#
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
|
|
{
|
|
/// <summary>
|
|
/// 任务结果
|
|
/// </summary>
|
|
public class TaskRes
|
|
{
|
|
public TaskRes()
|
|
{
|
|
}
|
|
public TaskRes(TotalCaptionsDto captions)
|
|
{
|
|
this.TeacherSpeaking = captions.TeacherSpeaking;
|
|
this.TimeBase = captions.TimeBase;
|
|
this.StudentSpeaking = captions.StudentSpeaking;
|
|
}
|
|
/// <summary>
|
|
/// 教师发言时间
|
|
/// <para>秒</para>
|
|
/// </summary>
|
|
public decimal TeacherSpeaking { get; set; } = 0;
|
|
/// <summary>
|
|
/// 学生发言时间
|
|
/// <para>秒</para>
|
|
/// </summary>
|
|
public decimal StudentSpeaking { get; set; } = 0;
|
|
/// <summary>
|
|
/// 高频词汇 从高到低
|
|
/// </summary>
|
|
public string[] Hotwords { get; set; }
|
|
/// <summary>
|
|
/// 教师提问类型
|
|
/// </summary>
|
|
public Dictionary<TeacherAnswerTypeEnum, int>? QuestionType { get; set; }
|
|
|
|
/// <summary>
|
|
/// 时间段概览
|
|
/// </summary>
|
|
public IEnumerable<TimeBase>? TimeOverview { get; set; }
|
|
/// <summary>
|
|
/// 视频时间轴
|
|
/// </summary>
|
|
public IEnumerable<TimeBase>? TimeBase { get; set; }
|
|
/// <summary>
|
|
/// GPT模型id
|
|
/// </summary>
|
|
public string GPTModel { get; set; } = string.Empty;
|
|
/// <summary>
|
|
/// AI综合评估
|
|
/// </summary>
|
|
public AssessmentDto Assessment { get; set; } = default!;
|
|
/// <summary>
|
|
/// AI综合评估得分
|
|
/// <para>满分100</para>
|
|
/// </summary>
|
|
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);
|
|
}
|
|
}
|