BotSharp/src/Infrastructure/BotSharp.Core/Routing/Hooks/RoutingAgentHook.cs

22 lines
623 B
C#
Raw Normal View History

2023-09-28 03:31:58 +00:00
using BotSharp.Abstraction.Functions.Models;
namespace BotSharp.Core.Routing.Hooks;
public class RoutingAgentHook : AgentHookBase
{
public RoutingAgentHook(IServiceProvider services, AgentSettings settings)
: base(services, settings)
{
}
public override bool OnFunctionsLoaded(ref List<FunctionDef> functions)
{
functions.Add(new FunctionDef
{
Name = "fallback_to_router",
Description = "If the user's request is beyond your capabilities, you can call this function for help."
});
return base.OnFunctionsLoaded(ref functions);
}
}