BotSharp/src/Infrastructure/BotSharp.Abstraction/Agents/Models/AgentUtility.cs

42 lines
1.1 KiB
C#
Raw Normal View History

2024-11-20 08:24:26 +00:00
namespace BotSharp.Abstraction.Agents.Models;
2024-11-20 16:13:40 +00:00
public class AgentUtility
2024-11-20 08:24:26 +00:00
{
2025-05-28 21:16:48 +00:00
public string Category { get; set; }
2024-11-20 16:13:40 +00:00
public string Name { get; set; }
2024-11-21 05:46:09 +00:00
public bool Disabled { get; set; }
2025-05-27 20:23:37 +00:00
[JsonPropertyName("visibility_expression")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? VisibilityExpression { get; set; }
2025-05-28 21:16:48 +00:00
public IEnumerable<UtilityItem> Items { get; set; } = [];
2024-11-20 08:24:26 +00:00
2024-11-20 16:13:40 +00:00
public AgentUtility()
2024-11-20 08:24:26 +00:00
{
}
2024-12-06 07:27:57 +00:00
public override string ToString()
{
2025-05-28 21:16:48 +00:00
return $"{Category}-{Name}";
2024-12-06 07:27:57 +00:00
}
2024-11-20 08:24:26 +00:00
}
2025-05-28 21:16:48 +00:00
public class UtilityItem
2024-11-20 08:24:26 +00:00
{
2025-05-28 21:16:48 +00:00
[JsonPropertyName("function_name")]
2025-06-05 03:15:07 +00:00
public string FunctionName { get; set; } = null!;
2024-11-20 08:24:26 +00:00
2025-05-28 21:16:48 +00:00
[JsonPropertyName("template_name")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? TemplateName { get; set; }
[JsonPropertyName("visibility_expression")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? VisibilityExpression { get; set; }
2025-06-05 03:15:07 +00:00
[JsonPropertyName("description")]
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public string? Description { get; set; }
2025-05-28 23:00:11 +00:00
}