Skip to content

Commit afdd9d7

Browse files
committed
Move KnowledgeService register to KnowledgebasePlugin
1 parent 8ee452e commit afdd9d7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Infrastructure/BotSharp.Core/Conversations/ConversationPlugin.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,6 @@ public void RegisterDI(IServiceCollection services, IConfiguration config)
5555
services.AddScoped<IExecutor, InstructExecutor>();
5656
services.AddScoped<IInstructService, InstructService>();
5757
services.AddScoped<ITokenStatistics, TokenStatistics>();
58-
59-
services.AddScoped<IKnowledgeService, KnowledgeService>();
6058
}
6159

6260
public bool AttachMenu(List<PluginMenuDef> menu)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using BotSharp.Abstraction.Plugins.Models;
22
using BotSharp.Abstraction.Settings;
3+
using BotSharp.Core.Knowledges.Services;
34
using BotSharp.Plugin.KnowledgeBase.Converters;
45
using BotSharp.Plugin.KnowledgeBase.Hooks;
56
using Microsoft.Extensions.Configuration;
@@ -24,6 +25,8 @@ public void RegisterDI(IServiceCollection services, IConfiguration config)
2425
services.AddSingleton<IPdf2TextConverter, PigPdf2TextConverter>();
2526
services.AddScoped<IAgentUtilityHook, KnowledgeBaseUtilityHook>();
2627
services.AddScoped<IAgentHook, KnowledgeBaseAgentHook>();
28+
29+
services.AddScoped<IKnowledgeService, KnowledgeService>();
2730
}
2831

2932
public bool AttachMenu(List<PluginMenuDef> menu)

0 commit comments

Comments
 (0)