From 9d2698b22ff02c0280b16ceb52051df9e0cc1575 Mon Sep 17 00:00:00 2001 From: zpc Date: Tue, 16 Jul 2024 16:32:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A7=92=E8=89=B2=E7=AE=80?= =?UTF-8?q?=E4=BB=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs | 10 ++++++++++ .../HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs | 6 +++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs index 3be60cc..d0df645 100644 --- a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs +++ b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs @@ -164,6 +164,16 @@ namespace HuanMeng.MiaoYu.Code.Chat } //if(timeStamp.) var userChatSession = await Dao.daoDbMiaoYu.context.T_User_Chat.Where(it => it.CharacterId == characterId && it.UserId == _UserId && !it.IsDelete).FirstOrDefaultAsync(); + ChatMessageDto chatMessageDto1 = new ChatMessageDto() + { + ClaudeType = ChatMessageType.text.ToString(), + Content = charact.Biography ?? "", + Role = ChatRole.profile.ToString(), + Timestamp = DateTime.Now, + UserIcon = "", + Id = 0 + }; + chatMessageDtos.Add(chatMessageDto1); if (userChatSession == null) { userChatSession = new T_User_Chat() 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 fde7b10..e818e43 100644 --- a/src/0-core/HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs +++ b/src/0-core/HuanMeng.MiaoYu.Model/EnumModel/Chat/ChatRole.cs @@ -26,6 +26,10 @@ namespace HuanMeng.MiaoYu.Model.EnumModel.Chat /// /// 提示 /// - tips + tips, + /// + /// 简介 + /// + profile, } }