BotSharp/src/Infrastructure/BotSharp.OpenAPI/ViewModels/Conversations/ChatResponseModel.cs

33 lines
970 B
C#
Raw Normal View History

using BotSharp.Abstraction.Functions.Models;
2023-11-03 14:16:16 +00:00
using BotSharp.Abstraction.Instructs.Models;
2023-11-14 04:56:06 +00:00
using BotSharp.OpenAPI.ViewModels.Users;
2023-10-30 16:48:18 +00:00
using System.Text.Json.Serialization;
2023-10-27 15:18:48 +00:00
2023-08-19 00:15:02 +00:00
namespace BotSharp.OpenAPI.ViewModels.Conversations;
2023-11-14 04:56:06 +00:00
public class ChatResponseModel : InstructResult
2023-08-19 00:15:02 +00:00
{
2023-11-14 04:56:06 +00:00
[JsonPropertyName("conversation_id")]
public string ConversationId { get; set; }
public UserViewModel Sender { get; set; }
2023-08-20 20:20:16 +00:00
public string Function { get; set; }
2023-11-03 14:16:16 +00:00
/// <summary>
/// Planner instruction
/// </summary>
2023-10-30 16:48:18 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
public FunctionCallFromLlm Instruction { get; set; }
2023-11-03 14:16:16 +00:00
/// <summary>
/// Rich message for UI rendering
/// </summary>
2023-10-30 16:48:18 +00:00
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
2023-11-03 15:46:29 +00:00
[JsonPropertyName("rich_content")]
public object? RichContent { get; set; }
2023-11-14 04:56:06 +00:00
2023-11-14 14:13:54 +00:00
[JsonPropertyName("created_at")]
2023-11-14 04:56:06 +00:00
public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
2023-08-19 00:15:02 +00:00
}