BotSharp/src/Plugins/BotSharp.Plugin.MongoStorage/Models/AgentKnowledgeBaseMongoElement.cs

31 lines
853 B
C#
Raw Normal View History

2024-12-24 19:21:18 +00:00
using BotSharp.Abstraction.Agents.Models;
namespace BotSharp.Plugin.MongoStorage.Models;
public class AgentKnowledgeBaseMongoElement
{
public string Name { get; set; }
2024-12-30 03:49:38 +00:00
public string Type { get; set; }
2024-12-24 19:21:18 +00:00
public bool Disabled { get; set; }
2024-12-30 03:49:38 +00:00
2024-12-24 19:21:18 +00:00
public static AgentKnowledgeBaseMongoElement ToMongoElement(AgentKnowledgeBase knowledgeBase)
{
return new AgentKnowledgeBaseMongoElement
{
2024-12-30 03:49:38 +00:00
Name = knowledgeBase.Name,
Type = knowledgeBase.Type,
Disabled = knowledgeBase.Disabled
2024-12-24 19:21:18 +00:00
};
}
public static AgentKnowledgeBase ToDomainElement(AgentKnowledgeBaseMongoElement knowledgeBase)
{
return new AgentKnowledgeBase
{
Name = knowledgeBase.Name,
2024-12-30 03:49:38 +00:00
Type = knowledgeBase.Type,
2024-12-24 19:21:18 +00:00
Disabled = knowledgeBase.Disabled
};
}
}