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

69 lines
1.4 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")]
public string FunctionName { get; set; } = string.Empty;
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; }
2024-11-20 08:24:26 +00:00
}
2025-05-28 21:16:48 +00:00
//public class UtilityFunction : UtilityBase
//{
// public UtilityFunction()
// {
2024-11-20 08:24:26 +00:00
2025-05-28 21:16:48 +00:00
// }
2024-11-20 08:24:26 +00:00
2025-05-28 21:16:48 +00:00
// public UtilityFunction(string name)
// {
// Name = name;
// }
//}
2024-11-20 08:24:26 +00:00
2025-05-28 21:16:48 +00:00
//public class UtilityTemplate : UtilityBase
//{
// public UtilityTemplate()
// {
// }
// public UtilityTemplate(string name)
// {
// Name = name;
// }
//}
//public class UtilityBase
//{
// public string Name { get; set; }
//}