BotSharp/Bot.Rasa/Adapters/Dialogflow/DialogflowEntity.cs
haiping008@gmail.com 33d42ae035 1. Added context in/ out, lifespan.
2. Import agent in Dialogflow format.
3. Lazy training per input contexts.
2018-03-21 16:07:43 -05:00

43 lines
926 B
C#

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace Bot.Rasa.Adapters.Dialogflow
{
[JsonObject]
public class DialogflowEntity
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("entries")]
public List<DialogflowEntityEntry> Entries { get; set; }
public DialogflowEntity()
{
}
public DialogflowEntity(string name)
{
this.Name = name;
}
public DialogflowEntity(string name, List<DialogflowEntityEntry> entries)
{
this.Name = name;
this.Entries = entries;
}
public void AddEntry(DialogflowEntityEntry entry)
{
if (Entries == null)
{
Entries = new List<DialogflowEntityEntry>();
}
Entries.Add(entry);
}
}
}