using System.Collections.Generic; using System.Text.Json.Serialization; using Tango.Portal.Chat.Web.Services; namespace Tango.Portal.Chat.Web.Models { public sealed class ProposeKqlResult { [JsonPropertyName("kql")] public string Kql { get; set; } = string.Empty; [JsonPropertyName("parameterTypes")] public Dictionary? ParameterTypes { get; set; } [JsonPropertyName("parameters")] public Dictionary Parameters { get; set; } = new(); // NEW: be flexible about shapes from the model [JsonPropertyName("assumptions")] [JsonConverter(typeof(FlexibleStringListConverter))] public List? Assumptions { get; set; } [JsonPropertyName("why")] public string? Why { get; set; } [JsonPropertyName("assistant")] public string Assistant { get; set; } = string.Empty; [JsonPropertyName("conversation")] public string ConversationAnswer { get; set; } = String.Empty; public LlmProvider Provider { get; set; } } public sealed class ChatMessage { // "user" | "assistant" public string Role { get; set; } = "user"; public string Content { get; set; } = string.Empty; public String UsedKql { get; set; } = String.Empty; } public sealed class ChatRequest { public List? History { get; set; } public string? ThreadId { get; set; } // shared Assistants thread for the whole chat public string Question { get; set; } = string.Empty; public string? From { get; set; } public string? To { get; set; } } public sealed class ChatResponse { public string? ThreadId { get; set; } // shared Assistants thread for the whole chat public string Answer { get; set; } = string.Empty; public string UsedKql { get; set; } = string.Empty; public object? Preview { get; set; } public string Ploty { get; set; } = string.Empty; } }