mirror of
https://gitee.com/ccnetcore/Yi
synced 2026-04-28 20:23:26 +08:00
23 lines
548 B
C#
23 lines
548 B
C#
|
|
using Yi.Framework.Stock.Domain.Managers.Plugins;
|
|||
|
|
|
|||
|
|
namespace Yi.Framework.Stock.Domain.Managers;
|
|||
|
|
|
|||
|
|
public class NewsManager
|
|||
|
|
{
|
|||
|
|
private SemanticKernelClient _skClient;
|
|||
|
|
|
|||
|
|
public NewsManager(SemanticKernelClient skClient)
|
|||
|
|
{
|
|||
|
|
_skClient = skClient;
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/// <summary>
|
|||
|
|
/// 生成一个新闻
|
|||
|
|
/// </summary>
|
|||
|
|
/// <returns></returns>
|
|||
|
|
public async Task GenerateNewsAsync()
|
|||
|
|
{
|
|||
|
|
_skClient.RegisterPlugins<NewsPlugins>("news");
|
|||
|
|
await _skClient.ChatCompletionAsync("帮我生成一个新闻");
|
|||
|
|
}
|
|||
|
|
}
|