| .vs/PolicyControl/FileContentIndex/16911364-62da-410c-b2f6-047496297e5f.vsidx | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| .vs/PolicyControl/v17/fileList.bin | 补丁 | 查看 | 原始文档 | blame | 历史 | |
| GasolineBlend.BLL/AgentDataBLL.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| GasolineBlend.DAL/AgentDataDAL.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| GasolineBlend/Controllers/AgentDataController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| GasolineBlend/Controllers/ChatHistoryController.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.vs/PolicyControl/FileContentIndex/16911364-62da-410c-b2f6-047496297e5f.vsidxBinary files differ
.vs/PolicyControl/v17/fileList.binBinary files differ
GasolineBlend.BLL/AgentDataBLL.cs
@@ -32,6 +32,11 @@ return new PaginatedResult<AgentDataPage>(totalData, totalCount, totalPage); } public List<AgentDataPage> GetAgentDescription(string Text) { return _acc.GetAgentDescription(Text); } public bool DelAgentDataById(int id) { return _acc.DelAgentDataById(id); GasolineBlend.DAL/AgentDataDAL.cs
@@ -11,6 +11,7 @@ using Google.Protobuf.WellKnownTypes; using Microsoft.Office.Interop.Excel; using MySql.Data.MySqlClient; using static System.Net.Mime.MediaTypeNames; namespace GasolineBlend.DAL { @@ -108,6 +109,36 @@ } } public List<AgentDataPage> GetAgentDescription(string Text) { using (IDbConnection connection = new MySqlConnection(connectionString)) { string[] models = Text.Split(','); var sql = $"SELECT prompt from agentdata WHERE 1=1 "; if (models != null) { sql += $" and ( "; for (int i=0;i< models.Length;i++) { if (i == 0) { sql += $" name like '%{models[i]}%' "; } else { sql += $" or name like '%{models[i]}%' "; } } sql += $" ) "; } else { sql += $" and id = 0"; } return connection.Query<AgentDataPage>(sql).ToList(); } } public bool DelAgentDataById(int id) { using (IDbConnection connection = new MySqlConnection(connectionString)) GasolineBlend/Controllers/AgentDataController.cs
@@ -55,6 +55,29 @@ } /// <summary> ///获取智能体详细 /// </summary> /// <param name="Keyword"></param> /// <returns></returns> [HttpPost] public ActionResult GetAgentDescription(string Text) { try { var list = _acc.GetAgentDescription(Text); return SuccessNoShow(data: list); } catch (Exception e) { LogHelper.Write(Level.Error, "获取智能体详细 GetAgentDescription", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); return Error(); } } /// <summary> ///删除智能体 /// </summary> /// <param name="Keyword"></param> GasolineBlend/Controllers/ChatHistoryController.cs
@@ -58,7 +58,7 @@ { var model = _acc.GetPromptApi(AgentId); if (model[0].ModelApi != null && model[0].ModelKey != null) { string apiUrl = "http://122.51.217.202/v1/chat-messages"; string apiUrl = model[0].ModelApi; // 设置授权令牌 string bearerToken = model[0].ModelKey; string jsonContent = $@"{{