diff --git a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs index eb10dff..30422d4 100644 --- a/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs +++ b/src/0-core/HuanMeng.MiaoYu.Code/Chat/ChatBLL.cs @@ -251,6 +251,10 @@ namespace HuanMeng.MiaoYu.Code.Chat var claude = charact.ModelConfig.GetClaudeChatConfig(); IChat chat = new ClaudeChat(claude, HttpClientFactory); var response = await chat.MessagesAsync(baseChatParams); + if (response == null) + { + throw new Exception("ai出现错误"); + } var claudeChatResponse = response as ClaudeChatResponse; #endregion T_Chat t_Chat = new T_Chat