2023-10-28 20:59:26 +00:00
|
|
|
using BotSharp.Abstraction.Functions.Models;
|
|
|
|
|
|
2024-01-29 18:08:49 +00:00
|
|
|
namespace BotSharp.Abstraction.Routing.Planning;
|
2023-10-28 20:59:26 +00:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Task breakdown and execution plan
|
2023-11-12 05:16:52 +00:00
|
|
|
/// https://www.promptingguide.ai/techniques/cot
|
2023-10-28 20:59:26 +00:00
|
|
|
/// </summary>
|
|
|
|
|
public interface IPlaner
|
|
|
|
|
{
|
2024-02-02 04:16:57 +00:00
|
|
|
Task<FunctionCallFromLlm> GetNextInstruction(Agent router, string messageId, List<RoleDialogModel> dialogs);
|
2024-02-19 22:55:41 +00:00
|
|
|
Task<bool> AgentExecuting(Agent router, FunctionCallFromLlm inst, RoleDialogModel message, List<RoleDialogModel> dialogs);
|
|
|
|
|
Task<bool> AgentExecuted(Agent router, FunctionCallFromLlm inst, RoleDialogModel message, List<RoleDialogModel> dialogs);
|
|
|
|
|
List<RoleDialogModel> BeforeHandleContext(FunctionCallFromLlm inst, RoleDialogModel message, List<RoleDialogModel> dialogs)
|
|
|
|
|
=> dialogs;
|
|
|
|
|
bool AfterHandleContext(List<RoleDialogModel> dialogs, List<RoleDialogModel> taskAgentDialogs)
|
|
|
|
|
=> true;
|
2024-02-01 18:32:16 +00:00
|
|
|
int MaxLoopCount => 5;
|
2023-10-28 20:59:26 +00:00
|
|
|
}
|