Compare commits

...

2 Commits

Author SHA1 Message Date
小肥羊 b161d83aac 输出错误模型 2026-04-10 18:38:20 +08:00
小肥羊 8abe276c9d 优化 提示词 加上分析的改进意见 2026-04-10 18:19:19 +08:00
3 changed files with 14 additions and 8 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

@ -75,7 +75,7 @@ namespace VideoAnalysisCore.AICore.GPT
var chatResp = await PostJsonStreamAsync(Config.Host + Config.Path, chatReq, Config.ApiKey); var chatResp = await PostJsonStreamAsync(Config.Host + Config.Path, chatReq, Config.ApiKey);
if (!chatResp.IsSuccessStatusCode) if (!chatResp.IsSuccessStatusCode)
{ {
await _workflowManager.AddTaskLog(chatReq.taskId, "==>请求GPT服务器异常 " + chatResp?.StatusCode + " " + await chatResp.Content.ReadAsStringAsync()); await _workflowManager.AddTaskLog(chatReq.taskId, $"==>请求GPT服务器异常 {chatResp?.StatusCode} 模型 {chatReq.model} {await chatResp.Content.ReadAsStringAsync()}");
if (--i < 0) if (--i < 0)
{ {
throw new Exception("请求GPT服务器失败次数过多"); throw new Exception("请求GPT服务器失败次数过多");

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)
//{ //{