BotSharp/src/Infrastructure/BotSharp.Abstraction/Routing/IRoutingService.cs

51 lines
1.6 KiB
C#
Raw Normal View History

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-02-28 20:40:59 +00:00
IRoutingContext Context { get; }
2024-01-26 04:32:48 +00:00
/// <summary>
/// Get routable agents
/// </summary>
/// <param name="profiles">router's profile</param>
/// <returns></returns>
RoutableAgent[] GetRoutableAgents(List<string> profiles);
2024-01-26 04:32:48 +00:00
/// <summary>
/// Get rules by agent name
/// </summary>
/// <param name="name">agent name</param>
/// <returns></returns>
RoutingRule[] GetRulesByAgentName(string name);
/// <summary>
/// Get rules by agent id
/// </summary>
/// <param name="id">agent id </param>
/// <returns></returns>
2023-11-01 01:48:12 +00:00
RoutingRule[] GetRulesByAgentId(string id);
2024-01-27 01:14:14 +00:00
List<RoutingHandlerDef> GetHandlers(Agent router);
2024-10-29 19:59:46 +00:00
//void ResetRecursiveCounter();
//int GetRecursiveCounter();
//void SetRecursiveCounter(int counter);
Task<bool> InvokeAgent(string agentId, List<RoleDialogModel> dialogs);
Task<bool> InvokeFunction(string name, RoleDialogModel messages);
Task<RoleDialogModel> InstructLoop(RoleDialogModel message, List<RoleDialogModel> dialogs);
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>
Task<RoleDialogModel> InstructDirect(Agent agent, RoleDialogModel message);
2024-02-05 04:22:43 +00:00
2024-08-01 18:18:34 +00:00
Task<string> GetConversationContent(List<RoleDialogModel> dialogs, int maxDialogCount = 100);
2024-03-21 22:04:45 +00:00
(bool, string) HasMissingRequiredField(RoleDialogModel message, out string agentId);
2023-09-03 04:11:53 +00:00
}