Compare commits

..

2 Commits

3 changed files with 7 additions and 4 deletions

View File

@ -39,7 +39,8 @@
"ChatGpt": {
"KIMI": {
"Host": "https://api.moonshot.cn",
"ApiKey": "sk-8BvvhESZIkgUbiaaJhglPxFa4o2X9H3xEv9lXELrWWwGxHWY"
//"ApiKey": "sk-8BvvhESZIkgUbiaaJhglPxFa4o2X9H3xEv9lXELrWWwGxHWY"
"ApiKey": "sk-sHk2ecDDJW44svtJpviAZe8utY3bRnIyXVm9zMRwdnzhGkER"
},
"ChatGpt": {
//"Host": "https://api.g4f.icu/",

View File

@ -138,8 +138,9 @@ namespace VideoAnalysisCore.AICore.GPT
}
}
}
await redisManager.AddTaskLog(chatReq.taskId, DateTime.Now + "=>AI请求超时 " + chatReq.taskId);
return null;
throw new Exception(DateTime.Now + "=>AI请求超时 " + chatReq.taskId);
//await redisManager.AddTaskLog(chatReq.taskId, DateTime.Now + "=>AI请求超时 " + chatReq.taskId);
//return null;
}
/// <summary>
@ -202,7 +203,7 @@ namespace VideoAnalysisCore.AICore.GPT
}
catch (Exception ex)
{
await redisManager.AddTaskLog(chatRep.taskId, $"=>GPT结果解析错误 重试剩余{tryCount} {ex.Message}");
await redisManager.AddTaskLog(chatRep.taskId, $"=>GPT结果解析错误 重试剩余{tryCount} {ex.Message} {ex.StackTrace}");
}
}
await redisManager.AddTaskLog(chatRep.taskId, $"=>GPT请求失败次数过多!!!");

View File

@ -273,6 +273,7 @@ namespace VideoAnalysisCore.Controllers
[HttpGet]
public async Task ReStart(long id, RedisChannelEnum selectEnum)
{
await redisManager.AddTaskLog(id,"手动重试任务");
await redisManager.ClearTaskError(id);
_ = Task.Run(async () =>
await redisManager.InsertChannel(selectEnum, id)