2023-10-27 20:36:26 +00:00
|
|
|
using BotSharp.Abstraction.Functions.Models;
|
2023-11-03 14:16:16 +00:00
|
|
|
using BotSharp.Abstraction.Instructs.Models;
|
2023-12-19 13:16:43 +00:00
|
|
|
using BotSharp.Abstraction.Messaging;
|
|
|
|
|
using BotSharp.Abstraction.Messaging.Models.RichContent;
|
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")]
|
2023-12-19 13:16:43 +00:00
|
|
|
public string ConversationId { get; set; } = string.Empty;
|
2023-11-14 04:56:06 +00:00
|
|
|
|
2023-12-19 13:16:43 +00:00
|
|
|
public UserViewModel Sender { get; set; } = new UserViewModel();
|
2023-11-14 04:56:06 +00:00
|
|
|
|
2023-12-19 13:16:43 +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)]
|
2023-12-19 13:16:43 +00:00
|
|
|
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")]
|
2023-12-19 13:16:43 +00:00
|
|
|
public RichContent<IRichMessage>? 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
|
|
|
}
|