BotSharp/src/Infrastructure/BotSharp.Abstraction/Conversations/IConversationHook.cs

30 lines
917 B
C#
Raw Normal View History

2023-08-14 17:00:01 +00:00
using BotSharp.Abstraction.Conversations.Models;
using BotSharp.Abstraction.MLTasks;
namespace BotSharp.Abstraction.Conversations;
public interface IConversationHook
{
Agent Agent { get; }
IConversationHook SetAgent(Agent agent);
Conversation Conversation { get; }
IConversationHook SetConversation(Conversation conversation);
List<RoleDialogModel> Dialogs { get; }
/// <summary>
/// Triggered when dialog history is loaded
/// </summary>
/// <param name="dialogs"></param>
/// <returns></returns>
Task OnDialogsLoaded(List<RoleDialogModel> dialogs);
Task OnStateLoaded(ConversationState state);
Task OnStateChanged(string name, string preValue, string currentValue);
Task BeforeCompletion();
Task OnFunctionExecuting(RoleDialogModel message);
Task OnFunctionExecuted(RoleDialogModel message);
Task AfterCompletion(RoleDialogModel message);
}