fix use says is empty.
This commit is contained in:
parent
3019a3a17a
commit
a653aab13d
21
BotSharp.Core/Agents/AgentTrainConfig.cs
Normal file
21
BotSharp.Core/Agents/AgentTrainConfig.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
using EntityFrameworkCore.BootKit;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text;
|
||||
|
||||
namespace BotSharp.Core.Agents
|
||||
{
|
||||
[Table("Bot_AgentTrainConfig")]
|
||||
public class AgentTrainConfig : DbRecord, IDbRecord
|
||||
{
|
||||
[Required]
|
||||
[StringLength(36)]
|
||||
public String AgentId { get; set; }
|
||||
|
||||
public decimal ClassificationThreshould { get; set; }
|
||||
|
||||
public String Pipeline { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -213,17 +213,21 @@ namespace BotSharp.Core.Engines
|
|||
|
||||
public void LoadBuildinEntities(Agent agent, string agentDir)
|
||||
{
|
||||
agent.Intents.ForEach(intent => {
|
||||
agent.Intents.ForEach(intent =>
|
||||
{
|
||||
|
||||
intent.UserSays.ForEach(us => {
|
||||
|
||||
us.Data.Where(data => data.Meta != null)
|
||||
.ToList()
|
||||
.ForEach(data =>
|
||||
{
|
||||
LoadBuildinEntityTypePerUserSay(agent, data);
|
||||
});
|
||||
});
|
||||
if (intent.UserSays != null)
|
||||
{
|
||||
intent.UserSays.ForEach(us =>
|
||||
{
|
||||
us.Data.Where(data => data.Meta != null)
|
||||
.ToList()
|
||||
.ForEach(data =>
|
||||
{
|
||||
LoadBuildinEntityTypePerUserSay(agent, data);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ namespace BotSharp.Core.Entities
|
|||
|
||||
public bool IsEnum { get; set; }
|
||||
|
||||
[StringLength(7)]
|
||||
[StringLength(6)]
|
||||
public string Color { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
|||
Loading…
Reference in a new issue