Move KnowledgeService register to KnowledgebasePlugin

This commit is contained in:
Haiping Chen 2024-09-05 06:39:26 -05:00
parent 8ee452ed1f
commit afdd9d7483
2 changed files with 3 additions and 2 deletions

View file

@ -55,8 +55,6 @@ public class ConversationPlugin : IBotSharpPlugin
services.AddScoped<IExecutor, InstructExecutor>();
services.AddScoped<IInstructService, InstructService>();
services.AddScoped<ITokenStatistics, TokenStatistics>();
services.AddScoped<IKnowledgeService, KnowledgeService>();
}
public bool AttachMenu(List<PluginMenuDef> menu)

View file

@ -1,5 +1,6 @@
using BotSharp.Abstraction.Plugins.Models;
using BotSharp.Abstraction.Settings;
using BotSharp.Core.Knowledges.Services;
using BotSharp.Plugin.KnowledgeBase.Converters;
using BotSharp.Plugin.KnowledgeBase.Hooks;
using Microsoft.Extensions.Configuration;
@ -24,6 +25,8 @@ public class KnowledgeBasePlugin : IBotSharpPlugin
services.AddSingleton<IPdf2TextConverter, PigPdf2TextConverter>();
services.AddScoped<IAgentUtilityHook, KnowledgeBaseUtilityHook>();
services.AddScoped<IAgentHook, KnowledgeBaseAgentHook>();
services.AddScoped<IKnowledgeService, KnowledgeService>();
}
public bool AttachMenu(List<PluginMenuDef> menu)