using BotSharp.Abstraction.Agents.Models; namespace BotSharp.OpenAPI.ViewModels.Agents; public class AgentUpdateModel { public string Name { get; set; } = string.Empty; public string? Description { get; set; } /// /// Instruction /// public string? Instruction { get; set; } /// /// Samples /// public string? Samples { get; set; } /// /// Functions /// public List Functions { get; set; } /// /// Routes /// public List Responses { get; set; } public Agent ToAgent() { var agent = new Agent { Name = Name }; if (Description != null) agent.Description = Description; if (Instruction != null) agent.Instruction = Instruction; if (Samples != null) agent.Samples = Samples; if (!Functions.IsEmpty()) agent.Functions = Functions; if (!Responses.IsEmpty()) agent.Responses = Responses; return agent; } }