using Mscc.GenerativeAI; namespace AiAgent.Core.Models; public static class ArticleClusterSchema { public static Schema Value => new() { Type = ParameterType.Object, Description = "Structured representation of selected, supporting, and discarded articles in a cluster.", Properties = new Dictionary { { "selectedArticle", new Schema { Type = ParameterType.Object, Description = "The main article chosen as most representative or relevant.", Properties = new Dictionary { { "title", new Schema { Type = ParameterType.String, Description = "Title of the selected article." } }, { "date", new Schema { Type = ParameterType.String, Description = "Publication date of the article." } }, { "description", new Schema { Type = ParameterType.String, Description = "Short summary of the article." } }, { "source_urls", new Schema { Type = ParameterType.Array, Description = "List of URLs where the article was published or referenced.", Items = new Schema { Type = ParameterType.String } } } }, Required = ["title", "date", "description", "source_urls"] } }, { "supportingTitles", new Schema { Type = ParameterType.Array, Description = "List of article titles that support or relate to the selected article.", Items = new Schema { Type = ParameterType.String }, Required = new List() // arrays don’t require internal fields, but list existence is enforced at root } }, { "discardedArticles", new Schema { Type = ParameterType.Array, Description = "Articles considered but discarded, including reasons and possible matches.", Items = new Schema { Type = ParameterType.Object, Properties = new Dictionary { { "title", new Schema { Type = ParameterType.String, Description = "Title of the discarded article." } }, { "reason", new Schema { Type = ParameterType.String, Description = "Reason for discarding this article." } }, { "matchedArticleTitle", new Schema { Type = ParameterType.String, Description = "Optional: title of a related or similar article.", Nullable = true } } }, Required = new List { "title", "reason" } } } } }, Required = ["selectedArticle", "supportingTitles", "discardedArticles"] }; }