diff options
| author | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-09-02 20:36:48 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <roy.mail.net@gmail.com> | 2025-09-02 20:36:48 +0300 |
| commit | dc0d050ad35973e1ae09e3c7e47bc1fb13eedcd2 (patch) | |
| tree | f1921cbdfca16b254a9046ab1e8dd17427d81dcd /Software/Visual_Studio_22/Tango.Portal.Chat.Web/Models/Contracts.cs | |
| parent | f41758ec7d1e28deae447199fc0024467c84a9d4 (diff) | |
| download | Tango-dc0d050ad35973e1ae09e3c7e47bc1fb13eedcd2.tar.gz Tango-dc0d050ad35973e1ae09e3c7e47bc1fb13eedcd2.zip | |
Portal AI
Diffstat (limited to 'Software/Visual_Studio_22/Tango.Portal.Chat.Web/Models/Contracts.cs')
| -rw-r--r-- | Software/Visual_Studio_22/Tango.Portal.Chat.Web/Models/Contracts.cs | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/Software/Visual_Studio_22/Tango.Portal.Chat.Web/Models/Contracts.cs b/Software/Visual_Studio_22/Tango.Portal.Chat.Web/Models/Contracts.cs new file mode 100644 index 000000000..d968d0738 --- /dev/null +++ b/Software/Visual_Studio_22/Tango.Portal.Chat.Web/Models/Contracts.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using System.Text.Json.Serialization; + +namespace ChatADX.Web.Models +{ + public sealed class ProposeKqlResult + { + [JsonPropertyName("kql")] + public string Kql { get; set; } = string.Empty; + + [JsonPropertyName("parameterTypes")] + public Dictionary<string, string>? ParameterTypes { get; set; } + + [JsonPropertyName("parameters")] + public Dictionary<string, string> Parameters { get; set; } = new(); + + // NEW: be flexible about shapes from the model + [JsonPropertyName("assumptions")] + [JsonConverter(typeof(FlexibleStringListConverter))] + public List<string>? Assumptions { get; set; } + + [JsonPropertyName("why")] + public string? Why { get; set; } + + [JsonPropertyName("assistant")] + public string Assistant { get; set; } = string.Empty; + } + + public sealed class ChatMessage + { + // "user" | "assistant" + public string Role { get; set; } = "user"; + public string Content { get; set; } = string.Empty; + } + + public sealed class ChatRequest + { + public List<ChatMessage>? 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; } + } +} |
