BotSharp/BotSharp.Core/Models/AIRequest.cs
haiping008@gmail.com 6c472545c0 Rename project
2018-03-28 17:08:49 -05:00

42 lines
949 B
C#

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
namespace BotSharp.Core.Models
{
public class AIRequest : QuestionMetadata
{
public string[] Query { get; set; }
public float[] Confidence { get; set; }
public List<AIContext> Contexts { get; set; }
public bool? ResetContexts { get; set; }
public OriginalRequest OriginalRequest { get; set; }
public AIRequest()
{
Contexts = new List<AIContext>();
}
public AIRequest(string text)
{
Query = new string[] { text };
Confidence = new float[] { 1.0f };
Contexts = new List<AIContext>();
}
public AIRequest(string text, RequestExtras requestExtras) : this(text)
{
if (requestExtras != null)
{
requestExtras.CopyTo(this);
}
}
}
}