BotSharp/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Agents/AgentCreationModel.cs

38 lines
1.1 KiB
C#
Raw Normal View History

2023-08-19 00:15:02 +00:00
using BotSharp.Abstraction.Agents.Models;
2023-09-18 23:14:24 +00:00
using BotSharp.Abstraction.Routing.Models;
2023-08-19 00:15:02 +00:00
namespace BotSharp.OpenAPI.ViewModels.Agents;
public class AgentCreationModel
{
public string Name { get; set; }
public string Description { get; set; }
2023-08-28 05:28:14 +00:00
public string Instruction { get; set; }
2023-09-12 22:08:58 +00:00
public List<AgentTemplate> Templates { get; set; }
2023-09-02 05:10:46 +00:00
public List<string> Functions { get; set; }
2023-09-09 21:44:25 +00:00
public List<AgentResponse> Responses { get; set; }
2023-09-04 15:15:11 +00:00
public bool IsPublic { get; set; }
2023-09-18 23:14:24 +00:00
public bool AllowRouting { get; set; }
public bool Disabled { get; set; }
public List<string> Profiles { get; set; }
public List<RoutingRule> RoutingRules { get; set; }
2023-08-19 00:15:02 +00:00
public Agent ToAgent()
{
return new Agent
{
Name = Name,
2023-08-28 05:28:14 +00:00
Description = Description,
Instruction = Instruction,
2023-09-12 22:08:58 +00:00
Templates = Templates,
2023-08-28 05:28:14 +00:00
Functions = Functions,
2023-09-04 15:15:11 +00:00
Responses = Responses,
2023-09-18 23:14:24 +00:00
IsPublic = IsPublic,
AllowRouting = AllowRouting,
Disabled = Disabled,
Profiles = Profiles,
RoutingRules = RoutingRules
2023-08-19 00:15:02 +00:00
};
}
}