2023-06-27 18:31:13 +00:00
|
|
|
using BotSharp.Abstraction.Conversations.Models;
|
2023-06-03 02:07:30 +00:00
|
|
|
|
|
|
|
|
namespace BotSharp.Abstraction.Conversations;
|
|
|
|
|
|
|
|
|
|
public interface IConversationService
|
|
|
|
|
{
|
2023-06-27 18:31:13 +00:00
|
|
|
Task<Conversation> NewConversation(Conversation conversation);
|
2023-07-19 22:30:23 +00:00
|
|
|
Task<Conversation> GetConversation(string id);
|
2023-06-27 18:31:13 +00:00
|
|
|
Task<List<Conversation>> GetConversations();
|
|
|
|
|
Task DeleteConversation(string id);
|
2023-08-07 17:48:09 +00:00
|
|
|
Task<bool> SendMessage(string agentId, string conversationId, RoleDialogModel lastDalog, Func<RoleDialogModel, Task> onMessageReceived, Func<RoleDialogModel, Task> onFunctionExecuting);
|
2023-07-27 15:07:39 +00:00
|
|
|
Task<bool> SendMessage(string agentId, string conversationId, List<RoleDialogModel> wholeDialogs, Func<RoleDialogModel, Task> onMessageReceived);
|
2023-08-09 21:49:55 +00:00
|
|
|
List<RoleDialogModel> GetDialogHistory(string conversationId, int lastCount = 20);
|
2023-06-27 18:31:13 +00:00
|
|
|
Task CleanHistory(string agentId);
|
2023-06-03 02:07:30 +00:00
|
|
|
}
|