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; }
|
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-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,
|
2023-09-02 05:10:46 +00:00
|
|
|
Responses = agent.Responses,
|
2023-09-04 15:15:11 +00:00
|
|
|
IsPublic= agent.IsPublic,
|
2023-08-19 00:15:02 +00:00
|
|
|
UpdatedDateTime = agent.UpdatedDateTime
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|