diff --git a/VideoAnalysis/appsettings.json b/VideoAnalysis/appsettings.json index 9bb72db..9b929b2 100644 --- a/VideoAnalysis/appsettings.json +++ b/VideoAnalysis/appsettings.json @@ -52,7 +52,7 @@ "ChatGpt": { //"Host": "https://api.g4f.icu/", "Host": "https://api.oaibest.com/", - "ApiKey": "sk-D15tBln31N7dI9Fi7lds7OySFv5tOEK7DMNsG5rY2E6DCr4s", + "ApiKey": "sk-uuCt3AZHawc9B543Yq5bxluO8aW35ArCY5fFnkh2LaJpFYA7", "Path": "v1/chat/completions" }, "DeepSeek": { diff --git a/VideoAnalysisCore/AICore/GPT/ChatGPTType.cs b/VideoAnalysisCore/AICore/GPT/ChatGPTType.cs index 0dfd19d..e4eb4f6 100644 --- a/VideoAnalysisCore/AICore/GPT/ChatGPTType.cs +++ b/VideoAnalysisCore/AICore/GPT/ChatGPTType.cs @@ -14,9 +14,10 @@ namespace VideoAnalysisCore.AICore.GPT public const string Deepseek_Reasoner = "deepseek-reasoner"; public const string Deepseek_Chat = "deepseek-chat"; - - public const string Gemini_3_Chat_thinking = "gemini-3-pro-preview-thinking"; + //渠道限制没有并发 + //public const string Gemini_3_Chat_thinking = "gemini-3-pro-preview-thinking"; public const string Gemini_3_Chat = "gemini-3-pro-preview"; + public const string Gemini_3_Chat_flash = "gemini-3-flash-preview"; } diff --git a/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs b/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs index 5d19b2e..2cc197f 100644 --- a/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs +++ b/VideoAnalysisCore/AICore/GPT/GTP_Analysis_1.cs @@ -189,8 +189,7 @@ namespace VideoAnalysisCore.AICore.GPT $"字幕列表 {rCaptionArr}。" + $"输出格式 json字符串 对象格式{fileNameResFormat}"; var task = taskInfo.Id.ToString(); - var fileNameInfoRes = await geminiClient.ChatAsync - (task, fileNamePostMessages, "授课章节"); + var fileNameInfoRes = await geminiClient.ChatAsync(task, fileNamePostMessages, "授课章节"); taskInfo.Sections = fileNameInfoRes.授课章节; await videoTaskDB.AsUpdateable() .SetColumns(it => it.Sections == fileNameInfoRes.授课章节) @@ -426,7 +425,7 @@ namespace VideoAnalysisCore.AICore.GPT """; await redisManager.AddTaskLog(taskInfo.Id, $"开始分析视频内容 {tryCount}"); - var res = await geminiClient.ChatAsync>(taskInfo.Id.ToString(), postMessages, "分析字幕", ChatGPTType.Gemini_3_Chat_thinking); + var res = await geminiClient.ChatAsync>(taskInfo.Id.ToString(), postMessages, "分析字幕", ChatGPTType.Gemini_3_Chat); return res; } catch (Exception ex) @@ -569,6 +568,8 @@ namespace VideoAnalysisCore.AICore.GPT /// private async Task AnalysisVideoQuestions(VideoTask taskInfo, List knowledgeInfos) { + await redisManager.AddTaskLog(taskInfo.Id, $"==>提取试题功能已禁用"); + return null; await redisManager.AddTaskLog(taskInfo.Id, $"==>{taskInfo.Id} 提取试题"); if (taskInfo is null || string.IsNullOrEmpty(taskInfo.PPTKeyFrame)) return null; @@ -700,6 +701,7 @@ namespace VideoAnalysisCore.AICore.GPT /// public async Task GetKnow(string task) { + var taskId = long.Parse(task); var taskInfo = await videoTaskDB.AsQueryable() .Where(s => s.Id == taskId) diff --git a/VideoAnalysisCore/AICore/GPT/Gemini/GeminiGPTClient.cs b/VideoAnalysisCore/AICore/GPT/Gemini/GeminiGPTClient.cs index dcc51b0..162eb62 100644 --- a/VideoAnalysisCore/AICore/GPT/Gemini/GeminiGPTClient.cs +++ b/VideoAnalysisCore/AICore/GPT/Gemini/GeminiGPTClient.cs @@ -46,7 +46,7 @@ namespace VideoAnalysisCore.AICore.GPT.Gemini Message[] messageArr = [ new Message(postMessages,"user"), ]; - model = model ?? ChatGPTType.Gemini_3_Chat; + model = model ?? ChatGPTType.Gemini_3_Chat_flash; messageArr = messageArr.Where(s => s != null).ToArray(); var chatReq = new ChatRequest {