using System.ComponentModel; using System.Text.Json.Serialization; using Microsoft.SemanticKernel; namespace Yi.Framework.Stock.Domain.Managers.Plugins; public class NewsPlugins { [KernelFunction("save_news"), Description("生成并且保存一个新闻")] public async Task SaveAsync(NewModel news) { return "成功"; } } public class NewModel { [JsonPropertyName("title")] [DisplayName("新闻标题")] public string Title { get; set; } [JsonPropertyName("content")] [DisplayName("新闻内容")] public string? Content { get; set; } }