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