| | |
| | | Prompt = Prompt.Replace("\t", "").Replace("\n", "").Replace("\r", "").Replace("\f", ""); |
| | | Prompt = Prompt.Replace(" ", ""); |
| | | Prompt = Prompt.Replace("\"", "“"); |
| | | Prompt = Prompt.Replace("\\", "\\\\"); |
| | | var list = _acc.GetChatHistory6List(AgentId, UserId); |
| | | string historylist = ""; |
| | | for (int i = list.Count - 1; i >= 0; i--) { |
| | |
| | | AgentId = AgentId, |
| | | Role = ro |
| | | }; |
| | | bool plus = _acc.UpdataUserNoById(AgentId, UserId); |
| | | int chatHistoryId = _acc.AddChatHistoryData(chatHistoryDataPage); |
| | | if (i == 0) |
| | | { |
| | |
| | | return Error(); |
| | | } |
| | | } |
| | | bool plus = _acc.UpdataUserNoById(AgentId, UserId); |
| | | int Count = _acc.GetChatHistoryCountList(UserId, AgentId,null); |
| | | JObject obj = JObject.Parse(responseContent); |
| | | obj.Add("Count", Count); |
| | |
| | | } |
| | | } |
| | | /// <summary> |
| | | ///删除智能体 |
| | | ///删除对话记录 |
| | | /// </summary> |
| | | /// <param name="Keyword"></param> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogHelper.Write(Level.Error, "删除智能体 DelChatHistoryDataById" + |
| | | LogHelper.Write(Level.Error, "删除对话记录 DelChatHistoryDataById" + |
| | | "" + |
| | | "", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |