BotSharp/src/Infrastructure/BotSharp.Abstraction/Routing/Models/RetrievalArgs.cs

25 lines
618 B
C#
Raw Normal View History

2023-08-28 03:50:10 +00:00
using System.Text.Json;
using System.Text.Json.Serialization;
namespace BotSharp.Abstraction.Routing.Models;
public class RetrievalArgs : RoutingArgs
{
[JsonPropertyName("question")]
public string Question { get; set; }
2023-08-28 15:58:35 +00:00
[JsonPropertyName("answer")]
public string Answer { get; set; }
2023-09-09 20:13:19 +00:00
[JsonPropertyName("reason")]
public string Reason { get; set; }
2023-08-28 03:50:10 +00:00
[JsonPropertyName("args")]
public JsonDocument Arguments { get; set; }
2023-09-19 12:17:50 +00:00
public override string ToString()
{
2023-09-20 10:31:50 +00:00
return $" [{AgentName}]: {Question} ({JsonSerializer.Serialize(Arguments)}) => {Answer} ({Reason})";
2023-09-19 12:17:50 +00:00
}
2023-08-28 03:50:10 +00:00
}