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

21 lines
521 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-11-21 06:50:55 +00:00
private static string HTTP_HANDLER_FN = "handle_http_request";
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
}
}