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

32 lines
859 B
C#
Raw Normal View History

using BotSharp.Abstraction.Agents.Models;
namespace BotSharp.Plugin.MongoStorage.Models;
2025-02-08 21:49:26 +00:00
[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
};
}
}