2018-09-28 22:25:55 +00:00
|
|
|
|
using BotSharp.Platform.Models;
|
|
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Platform.Abstraction
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Platform abstraction
|
|
|
|
|
|
/// Implement this interface to build a Chatbot platform
|
|
|
|
|
|
/// </summary>
|
2018-10-01 17:15:17 +00:00
|
|
|
|
public interface IPlatformBuilder<TAgent>
|
2018-09-28 22:25:55 +00:00
|
|
|
|
{
|
2018-10-01 17:15:17 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Agent storage
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
IAgentStorage<TAgent> Storage { get; set; }
|
|
|
|
|
|
|
2018-09-28 22:25:55 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Parse options for the incoming text or voice request from the sender.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
// DialogRequestOptions RequestOptions { get; set; }
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2018-10-01 13:36:39 +00:00
|
|
|
|
/// Convert platform specific data to standard training corpus format
|
2018-09-28 22:25:55 +00:00
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <param name="agent"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2018-10-01 13:36:39 +00:00
|
|
|
|
TrainingCorpus ExtractorCorpus(TAgent agent);
|
2018-09-28 22:25:55 +00:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
///
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
/// <typeparam name="TStorage"></typeparam>
|
|
|
|
|
|
/// <param name="agent"></param>
|
|
|
|
|
|
/// <returns></returns>
|
2018-09-29 18:18:34 +00:00
|
|
|
|
bool SaveAgent(TAgent agent);
|
2018-10-01 13:36:39 +00:00
|
|
|
|
|
2018-10-01 17:15:17 +00:00
|
|
|
|
Task<bool> Train(TAgent agent, TrainingCorpus corpus);
|
2018-09-28 22:25:55 +00:00
|
|
|
|
}
|
|
|
|
|
|
}
|