BotSharp/src/Plugins/BotSharp.Plugin.MongoStorage/Models/AgentResponseMongoElement.cs
2025-02-08 15:49:26 -06:00

32 lines
859 B
C#

using BotSharp.Abstraction.Agents.Models;
namespace BotSharp.Plugin.MongoStorage.Models;
[BsonIgnoreExtraElements(Inherited = true)]
public class AgentResponseMongoElement
{
public string Prefix { get; set; }
public string Intent { get; set; }
public string Content { get; set; }
public static AgentResponseMongoElement ToMongoElement(AgentResponse response)
{
return new AgentResponseMongoElement
{
Prefix = response.Prefix,
Intent = response.Intent,
Content = response.Content
};
}
public static AgentResponse ToDomainElement(AgentResponseMongoElement mongoResponse)
{
return new AgentResponse
{
Prefix = mongoResponse.Prefix,
Intent = mongoResponse.Intent,
Content = mongoResponse.Content
};
}
}