优化 提示词 加上分析的改进意见

This commit is contained in:
小肥羊 2026-04-10 18:19:19 +08:00
parent 3e2627c55e
commit 8abe276c9d
2 changed files with 13 additions and 7 deletions

View File

@ -11,7 +11,7 @@ namespace VideoAnalysisCore.AICore.GPT
//public const string GPT5_mini = "gpt-5-mini"; //public const string GPT5_mini = "gpt-5-mini";
//public const string GPT5 = "gpt-5-2025-08-07"; //public const string GPT5 = "gpt-5-2025-08-07";
public const string GPT54_mini = "gpt-5.4-mini"; public const string GPT54_mini = "gpt-5.4-mini-2026-03-17";
public const string GPT54 = "gpt-5.4"; public const string GPT54 = "gpt-5.4";
public const string Deepseek_Reasoner = "deepseek-reasoner"; public const string Deepseek_Reasoner = "deepseek-reasoner";

View File

@ -220,16 +220,17 @@ namespace VideoAnalysisCore.AICore.GPT
var checkMessage = var checkMessage =
$""" $"""
{(taskInfo.VideoType == AttachmentsInfoType. ?" 本堂课是复习课,分段可能是针对大段的知识点讲解" :string.Empty)}
{pptFormat} {pptFormat}
{sections} {sections}
Theme/Conten匹配,() Theme/Conten匹配,()
Conten有关联() Conten有关联()
: :
1. 1.
2. 2.
3. 3.
0-10070,, 0-10070,,
@ -394,7 +395,7 @@ namespace VideoAnalysisCore.AICore.GPT
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
private async Task<List<VideoKnowRes>> Analytics(VideoTask taskInfo, private async Task<List<VideoKnowRes>> Analytics(VideoTask taskInfo,
TotalCaptionsDto captions, string sections) TotalCaptionsDto captions, string sections,string last改进意见)
{ {
var tryCount = 10; var tryCount = 10;
while (tryCount-- > 0) while (tryCount-- > 0)
@ -422,8 +423,10 @@ namespace VideoAnalysisCore.AICore.GPT
{keyFrameStr} {keyFrameStr}
Stage Stage
Content40~150..., Content40~150..., ,
ThemeContent西 ThemeContent xxxx的基本应用
{(string.IsNullOrEmpty(last改进意见) ? last改进意见 :"我还有一段上次分析结果的的改进意见 也请你在分析时也参考不要在出现相同问题 "+ last改进意见)}
--------------------------------------------------------
json格式({resFormat}) json格式({resFormat})
(:|). (:|).
@ -760,10 +763,11 @@ namespace VideoAnalysisCore.AICore.GPT
var maxVideoTime = captions?.TimeBase?.LastOrDefault()?.End ?? 0; var maxVideoTime = captions?.TimeBase?.LastOrDefault()?.End ?? 0;
List<VideoKnowRes>? questionRes = null; List<VideoKnowRes>? questionRes = null;
var tryCount = 20; var tryCount = 20;
var last改进意见 = string.Empty;
while (tryCount-- > 0) while (tryCount-- > 0)
{ {
//视频字幕分析 //视频字幕分析
questionRes = await Analytics(taskInfo, captions, sections); questionRes = await Analytics(taskInfo, captions, sections, last改进意见);
if (questionRes is null) continue; if (questionRes is null) continue;
//处理分段 知识点 //处理分段 知识点
List<VideoKonwPoint> insertData = await GetVideoKnow(questionRes, taskInfo, sections, knowledgeInfos); List<VideoKonwPoint> insertData = await GetVideoKnow(questionRes, taskInfo, sections, knowledgeInfos);
@ -774,6 +778,8 @@ namespace VideoAnalysisCore.AICore.GPT
await _workflowManager.AddTaskLog(taskInfo.Id, $"==>课堂内容AI分析结果 得分=>{checkRes.Score}"); await _workflowManager.AddTaskLog(taskInfo.Id, $"==>课堂内容AI分析结果 得分=>{checkRes.Score}");
await _workflowManager.AddTaskLog(taskInfo.Id, $"==>改进意见 {checkRes.Suggestion}"); await _workflowManager.AddTaskLog(taskInfo.Id, $"==>改进意见 {checkRes.Suggestion}");
await _workflowManager.AddTaskLog(taskInfo.Id, $"==>扣分原因 {checkRes.MinusScore}"); await _workflowManager.AddTaskLog(taskInfo.Id, $"==>扣分原因 {checkRes.MinusScore}");
last改进意见 = checkRes.Suggestion;
// 质量复检 // 质量复检
//if (checkRes != null) //if (checkRes != null)
//{ //{