feat: 完成ai生成
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
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("帮我生成一个新闻");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user