forked from SciSharp/BotSharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleInjector.cs
More file actions
29 lines (26 loc) · 881 Bytes
/
ModuleInjector.cs
File metadata and controls
29 lines (26 loc) · 881 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
using BotSharp.Core;
using BotSharp.Core.AgentStorage;
using BotSharp.Core.Modules;
using BotSharp.Platform.Rasa.Models;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Text;
namespace BotSharp.Platform.Rasa
{
public class ModuleInjector : IModule
{
public void ConfigureServices(IServiceCollection services, IConfiguration config)
{
services.AddSingleton<RasaAi<AgentModel>>();
AgentStorageServiceRegister.Register<AgentModel>(services);
PlatformConfigServiceRegister.Register<PlatformSettings>("rasaAi", services, config);
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
{
}
}
}