BotSharp/Platform.Dialogflow/Models/AIRequest.cs

52 lines
1.2 KiB
C#
Raw Normal View History

using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Text;
2018-10-03 01:44:11 +00:00
namespace Platform.Dialogflow.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; }
2018-08-28 21:45:56 +00:00
/// <summary>
/// Agent directory
/// </summary>
public string AgentDir { get; set; }
2018-08-23 12:25:55 +00:00
/// <summary>
/// What model is used to predict.
/// </summary>
public string Model { get; set; }
public AIRequest()
{
Contexts = new List<AIContext>();
}
public AIRequest(string text)
{
Query = new string[] { text };
Confidence = new float[] { 1.0f };
2018-03-28 22:08:49 +00:00
Contexts = new List<AIContext>();
}
public AIRequest(string text, RequestExtras requestExtras) : this(text)
{
if (requestExtras != null)
{
requestExtras.CopyTo(this);
}
}
}
}