2023-08-19 00:15:02 +00:00
|
|
|
using BotSharp.Abstraction.Agents.Models;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.OpenAPI.ViewModels.Agents;
|
|
|
|
|
|
|
|
|
|
public class AgentViewModel
|
|
|
|
|
{
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string Description { get; set; }
|
2023-08-28 05:36:11 +00:00
|
|
|
public string Instruction { get; set; }
|
|
|
|
|
public string Functions { get; set; }
|
|
|
|
|
public List<string> Routes { get; set; }
|
2023-08-19 00:15:02 +00:00
|
|
|
public DateTime UpdatedDateTime { get; set; }
|
|
|
|
|
|
|
|
|
|
public static AgentViewModel FromAgent(Agent agent)
|
|
|
|
|
{
|
|
|
|
|
return new AgentViewModel
|
|
|
|
|
{
|
|
|
|
|
Id = agent.Id,
|
|
|
|
|
Name = agent.Name,
|
|
|
|
|
Description = agent.Description,
|
2023-08-28 05:36:11 +00:00
|
|
|
Instruction = agent.Instruction,
|
|
|
|
|
Functions = agent.Functions,
|
|
|
|
|
Routes = agent.Routes,
|
2023-08-19 00:15:02 +00:00
|
|
|
UpdatedDateTime = agent.UpdatedDateTime
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|