namespace BotSharp.Abstraction.Routing.Models;
public class RoutingArgs : ITrackableMessage
{
[JsonPropertyName("message_id")]
public string MessageId { get; set; }
[JsonPropertyName("function")]
public string Function { get; set; }
///
/// The reason why you select this function or agent
///
[JsonPropertyName("reason")]
public string Reason { get; set; } = string.Empty;
///
/// The content of replying to user
///
[JsonPropertyName("response")]
public string Response { get; set; }
///
/// Agent for next action based on user latest response
///
[JsonPropertyName("next_action_agent")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string AgentName { get; set; }
///
/// Agent who can achieve user original goal
///
[JsonPropertyName("user_goal_agent")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string OriginalAgent { get; set; }
public override string ToString()
{
var route = string.IsNullOrEmpty(AgentName) ? "" : $"";
if (string.IsNullOrEmpty(Response))
{
return $"[{Function} {route}]";
}
else
{
return $"[{Function} {route}] => {Response}";
}
}
}