Merge branch 'SciSharp:master' into master
This commit is contained in:
commit
4da1b90c07
|
|
@ -1,6 +1,7 @@
|
|||
using BotSharp.Abstraction.MLTasks;
|
||||
using BotSharp.Abstraction.Plugins.Models;
|
||||
using BotSharp.Abstraction.Settings;
|
||||
using BotSharp.Abstraction.Statistics.Settings;
|
||||
using BotSharp.Abstraction.Templating;
|
||||
using BotSharp.Abstraction.Users.Enums;
|
||||
using BotSharp.Core.Agents.Hooks;
|
||||
|
|
@ -34,6 +35,12 @@ public class AgentPlugin : IBotSharpPlugin
|
|||
services.AddScoped<IAgentHook, BasicAgentHook>();
|
||||
services.AddScoped<IBotSharpStatService, BotSharpStatService>();
|
||||
|
||||
services.AddScoped(provider =>
|
||||
{
|
||||
var settingService = provider.GetRequiredService<ISettingService>();
|
||||
return settingService.Bind<StatisticsSettings>("Statistics");
|
||||
});
|
||||
|
||||
services.AddScoped(provider =>
|
||||
{
|
||||
var settingService = provider.GetRequiredService<ISettingService>();
|
||||
|
|
|
|||
|
|
@ -16,11 +16,6 @@ public class DashboardPlugin : IBotSharpPlugin
|
|||
public void RegisterDI(IServiceCollection services, IConfiguration config)
|
||||
{
|
||||
services.AddScoped<IConversationHook, StatsConversationHook>();
|
||||
services.AddScoped(provider =>
|
||||
{
|
||||
var settingService = provider.GetRequiredService<ISettingService>();
|
||||
return settingService.Bind<StatisticsSettings>("Statistics");
|
||||
});
|
||||
}
|
||||
|
||||
public bool AttachMenu(List<PluginMenuDef> menu)
|
||||
|
|
|
|||
Loading…
Reference in a new issue