BotSharp/src/Plugins/BotSharp.Plugin.HttpHandler/Hooks/HttpHandlerUtilityHook.cs

22 lines
579 B
C#
Raw Normal View History

2024-07-02 18:36:45 +00:00
using BotSharp.Abstraction.Agents;
namespace BotSharp.Plugin.HttpHandler.Hooks;
public class HttpHandlerUtilityHook : IAgentUtilityHook
{
2024-12-04 22:12:02 +00:00
private static string PREFIX = "util-http-";
private static string HTTP_HANDLER_FN = $"{PREFIX}handle_http_request";
2024-11-21 06:50:55 +00:00
public void AddUtilities(List<AgentUtility> utilities)
2024-07-02 18:36:45 +00:00
{
2024-11-21 06:50:55 +00:00
var utility = new AgentUtility
{
Name = UtilityName.HttpHandler,
Functions = [new(HTTP_HANDLER_FN)],
Templates = [new($"{HTTP_HANDLER_FN}.fn")]
};
utilities.Add(utility);
2024-07-02 18:36:45 +00:00
}
}