From feb884d1f586a817073d543a0a6db96d3c1a0d52 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Fri, 15 Sep 2023 15:52:22 -0500 Subject: [PATCH] assign fields --- .../Agents/Services/AgentService.UpdateAgent.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.UpdateAgent.cs b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.UpdateAgent.cs index f113048b..7f6b619b 100644 --- a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.UpdateAgent.cs +++ b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.UpdateAgent.cs @@ -13,6 +13,13 @@ public partial class AgentService var record = FindAgent(agent.Id); if (record == null) return; + record.Name = agent.Name ?? string.Empty; + record.Description = agent.Description ?? string.Empty; + record.Instruction = agent.Instruction ?? string.Empty; + record.Functions = agent.Functions ?? new List(); + record.Templates = agent.Templates ?? new List(); + record.Responses = agent.Responses ?? new List(); + _db.UpdateAgent(record, updateField); await Task.CompletedTask; }