using System.Collections.Generic; using System.Linq; using System.Text.Json.Serialization; namespace ChatbotUI.ViewModels; public class OpenAiMessageInput { public string Model { get; set; } = string.Empty; public List Messages { get; set; } = new List(); [JsonPropertyName("max_tokens")] public int MaxTokens { get; set; } = 4000; public bool Stream { get; set; } = true; public float Temperature { get; set; } = 0.9f; public override string ToString() { return string.Join("\n", Messages.Select(x => x.Role + ": " + x.Content)); } }