2023-11-12 09:12:34 +00:00
|
|
|
using BotSharp.Abstraction.MLTasks;
|
|
|
|
|
using BotSharp.Abstraction.Plugins;
|
|
|
|
|
using Microsoft.Extensions.Configuration;
|
|
|
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
|
|
|
|
namespace BotSharp.Plugin.SemanticKernel
|
|
|
|
|
{
|
|
|
|
|
public class SemanticKernelPlugin : IBotSharpPlugin
|
|
|
|
|
{
|
|
|
|
|
public string Name => "Semantic Kernel";
|
|
|
|
|
public string Description => "Semantic Kernel Service";
|
2023-11-12 14:04:00 +00:00
|
|
|
|
2023-11-12 09:12:34 +00:00
|
|
|
public void RegisterDI(IServiceCollection services, IConfiguration config)
|
|
|
|
|
{
|
|
|
|
|
services.AddScoped<ITextCompletion, SemanticKernelTextCompletionProvider>();
|
|
|
|
|
services.AddScoped<IChatCompletion, SemanticKernelChatCompletionProvider>();
|
|
|
|
|
}
|
|
|
|
|
}
|
2023-11-12 14:04:00 +00:00
|
|
|
}
|