fix: 修复文件整理大师文件数量限制及模型名称错误

This commit is contained in:
ccnetcore
2025-09-13 21:19:54 +08:00
parent 0223b5c104
commit e7c152e955

View File

@@ -14,7 +14,8 @@ public class FileMasterService : ApplicationService
private readonly AiGateWayManager _aiGateWayManager; private readonly AiGateWayManager _aiGateWayManager;
private readonly AiBlacklistManager _aiBlacklistManager; private readonly AiBlacklistManager _aiBlacklistManager;
public FileMasterService(IHttpContextAccessor httpContextAccessor, AiGateWayManager aiGateWayManager, AiBlacklistManager aiBlacklistManager) public FileMasterService(IHttpContextAccessor httpContextAccessor, AiGateWayManager aiGateWayManager,
AiBlacklistManager aiBlacklistManager)
{ {
_httpContextAccessor = httpContextAccessor; _httpContextAccessor = httpContextAccessor;
_aiGateWayManager = aiGateWayManager; _aiGateWayManager = aiGateWayManager;
@@ -37,26 +38,16 @@ public class FileMasterService : ApplicationService
} }
else else
{ {
if (CurrentUser.IsInRole("")) if (input.DirectoryCount + input.FileCount >= 100)
{ {
if (input.DirectoryCount + input.FileCount >= 100) throw new UserFriendlyException("为防止无限制暴力使用当前文件整理大师Vip最多支持200文件与文件夹数量");
{
throw new UserFriendlyException("当前活动限免最大支持文件夹与文件200个数量如有大额文件整理评论区联系站长");
}
}
else
{
if (input.DirectoryCount + input.FileCount >= 1000)
{
throw new UserFriendlyException("为防止无限制暴力使用当前文件整理大师Vip最多支持1000文件与文件夹数量");
}
} }
} }
return Task.FromResult("success"); return Task.FromResult("success");
} }
/// <summary> /// <summary>
/// 对话 /// 对话
/// </summary> /// </summary>
@@ -72,8 +63,9 @@ public class FileMasterService : ApplicationService
} }
else else
{ {
input.Model = "gpt-5-mini"; input.Model = "gpt-5-chat";
} }
Guid? userId = CurrentUser.IsAuthenticated ? CurrentUser.GetId() : null; Guid? userId = CurrentUser.IsAuthenticated ? CurrentUser.GetId() : null;
if (userId is not null) if (userId is not null)
{ {