2018-03-28 22:08:49 +00:00
|
|
|
|
using BotSharp.Core.Entities;
|
2018-03-21 21:07:43 +00:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using System.Text;
|
|
|
|
|
|
|
2018-03-28 22:08:49 +00:00
|
|
|
|
namespace BotSharp.Core.Models
|
2018-03-21 21:07:43 +00:00
|
|
|
|
{
|
|
|
|
|
|
public class RequestExtras
|
|
|
|
|
|
{
|
|
|
|
|
|
public List<AIContext> Contexts { get; set; }
|
|
|
|
|
|
|
2018-05-22 00:39:33 +00:00
|
|
|
|
public List<EntityType> Entities { get; set; }
|
2018-03-21 21:07:43 +00:00
|
|
|
|
|
|
|
|
|
|
public bool HasContexts
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Contexts != null && Contexts.Count > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public bool HasEntities
|
|
|
|
|
|
{
|
|
|
|
|
|
get
|
|
|
|
|
|
{
|
|
|
|
|
|
if (Entities != null && Entities.Count > 0)
|
|
|
|
|
|
{
|
|
|
|
|
|
return true;
|
|
|
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public RequestExtras()
|
|
|
|
|
|
{
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2018-05-22 00:39:33 +00:00
|
|
|
|
public RequestExtras(List<AIContext> contexts, List<EntityType> entities)
|
2018-03-21 21:07:43 +00:00
|
|
|
|
{
|
|
|
|
|
|
this.Contexts = contexts;
|
|
|
|
|
|
this.Entities = entities;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public void CopyTo(AIRequest request)
|
|
|
|
|
|
{
|
|
|
|
|
|
if (HasContexts)
|
|
|
|
|
|
{
|
|
|
|
|
|
request.Contexts = Contexts;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (HasEntities)
|
|
|
|
|
|
{
|
|
|
|
|
|
request.Entities = Entities;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|