2024-12-24 19:21:18 +00:00
|
|
|
using BotSharp.Abstraction.Agents.Models;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Plugin.MongoStorage.Models;
|
|
|
|
|
|
2025-02-08 21:49:26 +00:00
|
|
|
[BsonIgnoreExtraElements(Inherited = true)]
|
2024-12-24 19:21:18 +00:00
|
|
|
public class AgentKnowledgeBaseMongoElement
|
|
|
|
|
{
|
2025-02-13 03:25:32 +00:00
|
|
|
public string Name { get; set; } = default!;
|
|
|
|
|
public string Type { get; set; } = default!;
|
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
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|