2023-11-01 01:48:12 +00:00
|
|
|
using BotSharp.Abstraction.Routing.Models;
|
|
|
|
|
|
2023-09-03 04:11:53 +00:00
|
|
|
namespace BotSharp.Abstraction.Routing;
|
|
|
|
|
|
|
|
|
|
public interface IRoutingService
|
|
|
|
|
{
|
2023-10-30 16:48:18 +00:00
|
|
|
Agent Router { get; }
|
2024-01-26 04:32:48 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Get routable agents
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="profiles">router's profile</param>
|
|
|
|
|
/// <returns></returns>
|
2024-01-24 23:02:59 +00:00
|
|
|
RoutableAgent[] GetRoutableAgents(List<string> profiles);
|
2024-01-26 04:32:48 +00:00
|
|
|
|
2023-11-01 01:48:12 +00:00
|
|
|
RoutingRule[] GetRulesByName(string name);
|
|
|
|
|
RoutingRule[] GetRulesByAgentId(string id);
|
|
|
|
|
List<RoutingHandlerDef> GetHandlers();
|
2023-10-20 23:57:45 +00:00
|
|
|
void ResetRecursiveCounter();
|
2023-10-30 16:48:18 +00:00
|
|
|
Task<bool> InvokeAgent(string agentId, List<RoleDialogModel> dialogs);
|
2023-12-07 03:06:09 +00:00
|
|
|
Task<bool> InvokeFunction(string name, RoleDialogModel message);
|
2023-10-30 16:48:18 +00:00
|
|
|
Task<RoleDialogModel> InstructLoop(RoleDialogModel message);
|
2023-11-16 18:20:43 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Talk to a specific Agent directly, bypassing the Router
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="agent"></param>
|
|
|
|
|
/// <param name="message"></param>
|
|
|
|
|
/// <returns></returns>
|
2024-01-24 23:02:59 +00:00
|
|
|
Task<RoleDialogModel> InstructDirect(Agent agent, RoleDialogModel message);
|
2023-09-03 04:11:53 +00:00
|
|
|
}
|