From 1b5faa06eae44fdb87f9b068b10e950da1a7b002 Mon Sep 17 00:00:00 2001 From: zpc Date: Sat, 24 Aug 2024 13:29:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs | 4 ++-- .../DbSqlServer/Db_MiaoYu/MiaoYuContext.cs | 6 ++---- src/0-core/HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs | 4 ++++ 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs index 5c89d1a..c06aea2 100644 --- a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs +++ b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs @@ -269,7 +269,7 @@ public class ChatBLL : MiaoYuBase #endregion var claudeChatResponse = await Chat(charact, mess); - if (claudeChatResponse.Message.Contains("香港") || claudeChatResponse.Message.Contains("台湾")) + if (claudeChatResponse.Message.Contains("香港") || claudeChatResponse.Message.Contains("台湾")|||| claudeChatResponse.Message.Contains("摇头丸")) { var chatMessage = new ChatMessageDto() { @@ -377,7 +377,7 @@ public class ChatBLL : MiaoYuBase { ClaudeType = ChatMessageType.text.ToString(), Content = $"您还剩余{cishu:F0}次聊天次数", - Role = ChatRole.tips.ToString(), + Role = ChatRole.pay.ToString(), Timestamp = DateTime.Now, Id = 0 }; diff --git a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs index 7031b1f..71e0fe7 100644 --- a/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs +++ b/src/0-core/HuanMeng.MiaoYu.Model/DbSqlServer/Db_MiaoYu/MiaoYuContext.cs @@ -438,14 +438,12 @@ public partial class MiaoYuContext : MultiTenantDbContext//DbContext .HasMaxLength(100) .HasComment("聊天返回的Id"); entity.Property(e => e.ClaudeModel) - .HasMaxLength(50) + .HasMaxLength(100) .HasComment("人物模型,聊天返回的模型"); entity.Property(e => e.ClaudeType) .HasMaxLength(20) .HasComment("聊天返回的消息的类型"); - entity.Property(e => e.Content) - .HasMaxLength(1000) - .HasComment("消息内容"); + entity.Property(e => e.Content).HasComment("消息内容"); entity.Property(e => e.CreateTime) .HasComment("创建时间") .HasColumnType("datetime"); diff --git a/src/0-core/HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs b/src/0-core/HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs index e818e43..875f50f 100644 --- a/src/0-core/HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs +++ b/src/0-core/HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs @@ -31,5 +31,9 @@ namespace HuanMeng.MiaoYu.Model.EnumModel.Chat /// 简介 /// profile, + /// + /// 支付 + /// + pay, } }