BotSharp/src/Infrastructure/BotSharp.Abstraction/Routing/Models/RoutingArgs.cs

34 lines
1 KiB
C#
Raw Normal View History

2023-08-28 03:50:10 +00:00
namespace BotSharp.Abstraction.Routing.Models;
public class RoutingArgs
{
2023-09-26 16:18:42 +00:00
[JsonPropertyName("function")]
2023-10-13 20:08:59 +00:00
public string Function { get; set; }
2023-09-26 16:18:42 +00:00
[JsonPropertyName("reason")]
public string Reason { get; set; } = "the reason why you select this function or agent";
2023-09-26 16:18:42 +00:00
[JsonPropertyName("answer")]
2023-10-13 20:08:59 +00:00
public string Answer { get; set; } = "the content of response to user";
2023-09-26 16:18:42 +00:00
[JsonPropertyName("next_action_agent")]
2023-10-13 20:08:59 +00:00
public string AgentName { get; set; } = "agent for next action based on user latest response";
[JsonPropertyName("user_goal_agent")]
2023-10-13 20:08:59 +00:00
public string OriginalAgent { get; set; } = "agent who can achieve user original goal";
public override string ToString()
{
2023-09-26 16:18:42 +00:00
var route = string.IsNullOrEmpty(AgentName) ? "" : $"<Route to {AgentName.ToUpper()} because {Reason}>";
if (string.IsNullOrEmpty(Answer))
{
return $"[{Function} {route}]";
}
else
{
return $"[{Function} {route}] => {Answer}";
}
}
}