2023-09-22 20:38:58 +00:00
|
|
|
using BotSharp.Abstraction.Functions.Models;
|
2023-09-24 16:20:02 +00:00
|
|
|
using BotSharp.Abstraction.Models;
|
2023-09-22 20:38:58 +00:00
|
|
|
|
|
|
|
|
namespace BotSharp.Abstraction.Routing;
|
|
|
|
|
|
2023-09-27 20:49:44 +00:00
|
|
|
/// <summary>
|
|
|
|
|
/// The routing handler will be injected to Router's FUNCTIONS section of the system prompt
|
|
|
|
|
/// So the handler will be invoked by LLM autonomously.
|
|
|
|
|
/// </summary>
|
2023-09-22 20:38:58 +00:00
|
|
|
public interface IRoutingHandler
|
|
|
|
|
{
|
|
|
|
|
string Name { get; }
|
|
|
|
|
string Description { get; }
|
2023-09-23 21:33:05 +00:00
|
|
|
bool IsReasoning { get => false; }
|
|
|
|
|
bool Enabled { get => true; }
|
2023-09-24 16:20:02 +00:00
|
|
|
List<NameDesc> Parameters { get => new List<NameDesc>(); }
|
2023-09-23 21:33:05 +00:00
|
|
|
|
|
|
|
|
void SetRouter(Agent router) { }
|
|
|
|
|
|
2023-09-27 12:51:15 +00:00
|
|
|
void SetDialogs(List<RoleDialogModel> dialogs) { }
|
2023-09-23 21:33:05 +00:00
|
|
|
|
2023-09-27 12:51:15 +00:00
|
|
|
Task<RoleDialogModel> Handle(IRoutingService routing, FunctionCallFromLlm inst);
|
2023-09-22 20:38:58 +00:00
|
|
|
}
|