From e7c152e95579a98cf9b2cd316433d8a18ed92129 Mon Sep 17 00:00:00 2001 From: ccnetcore Date: Sat, 13 Sep 2025 21:19:54 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=95=B4=E7=90=86=E5=A4=A7=E5=B8=88=E6=96=87=E4=BB=B6=E6=95=B0?= =?UTF-8?q?=E9=87=8F=E9=99=90=E5=88=B6=E5=8F=8A=E6=A8=A1=E5=9E=8B=E5=90=8D?= =?UTF-8?q?=E7=A7=B0=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Services/FileMaster/FileMasterService.cs | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FileMaster/FileMasterService.cs b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FileMaster/FileMasterService.cs index 3905ac4a..42b76c9b 100644 --- a/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FileMaster/FileMasterService.cs +++ b/Yi.Abp.Net8/module/ai-hub/Yi.Framework.AiHub.Application/Services/FileMaster/FileMasterService.cs @@ -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"); } - - + + /// /// 对话 /// @@ -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) {