BotSharp/src/Plugins/BotSharp.Plugin.KnowledgeBase/KnowledgeBasePlugin.cs

20 lines
731 B
C#
Raw Normal View History

2023-06-26 23:08:24 +00:00
using Microsoft.Extensions.Configuration;
namespace BotSharp.Plugin.KnowledgeBase;
2023-06-26 23:08:24 +00:00
public class KnowledgeBasePlugin : IBotSharpPlugin
{
2023-12-26 03:16:41 +00:00
public string Name => "Knowledge Base";
public string Description => "Embedding private data and feed them into LLM in the conversation.";
2023-06-26 23:08:24 +00:00
public void RegisterDI(IServiceCollection services, IConfiguration config)
{
var settings = new KnowledgeBaseSettings();
config.Bind("KnowledgeBase", settings);
services.AddSingleton(x => settings);
services.AddScoped<ITextChopper, TextChopperService>();
services.AddScoped<IKnowledgeService, KnowledgeService>();
services.AddSingleton<IPdf2TextConverter, PigPdf2TextConverter>();
2023-06-26 23:08:24 +00:00
}
}