From 4e3708e5251858944a1c2b7bcfc33077451a55e2 Mon Sep 17 00:00:00 2001 From: Jicheng Lu <103353@smsassist.com> Date: Fri, 1 Sep 2023 17:33:36 -0500 Subject: [PATCH] temp save --- BotSharp.sln | 20 +++++++-------- ...ettings.cs => BotSharpDatabaseSettings.cs} | 5 ++-- .../Agents/Services/AgentService.cs | 4 +-- .../BotSharpServiceCollectionExtensions.cs | 8 +++--- .../Services/ConversationStateService.cs | 14 ++++++----- .../Services/ConversationStorage.cs | 25 +++++++++++-------- .../Repository/DataContextHelper.cs | 2 +- .../Repository/FileRepository.cs | 4 +-- .../BotSharp.Core/Routing/Router.cs | 2 +- .../Collections/AgentCollection.cs | 2 +- .../Collections/ConversationCollection.cs | 2 +- .../Collections/UserAgentCollection.cs | 2 +- .../Collections/UserCollection.cs | 4 +-- .../BotSharp.Plugin.MongoStorage/MongoBase.cs | 2 +- .../MongoDbContext.cs | 4 +-- .../MongoRepositoryPlugin.cs | 17 ------------- .../MongoStoragePlugin.cs | 17 +++++++++++++ .../Repository/MongoRepository.cs | 4 +-- src/WebStarter/WebStarter.csproj | 2 +- src/WebStarter/appsettings.json | 4 +-- 20 files changed, 73 insertions(+), 71 deletions(-) rename src/Infrastructure/BotSharp.Abstraction/Repositories/{MyDatabaseSettings.cs => BotSharpDatabaseSettings.cs} (88%) delete mode 100644 src/Plugins/BotSharp.Plugin.MongoStorage/MongoRepositoryPlugin.cs create mode 100644 src/Plugins/BotSharp.Plugin.MongoStorage/MongoStoragePlugin.cs diff --git a/BotSharp.sln b/BotSharp.sln index 22f2e6a4..dc396cc3 100644 --- a/BotSharp.sln +++ b/BotSharp.sln @@ -55,7 +55,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.RoutingSpee EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "DataStorages", "DataStorages", "{5CD330E1-9E5A-4112-8346-6E31CA98EF78}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.MongoStorage", "src\Plugins\BotSharp.Plugin.MongoRepository\BotSharp.Plugin.MongoStorage.csproj", "{5AEB21CB-02C1-4678-91FA-554EC55E9467}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BotSharp.Plugin.MongoStorage", "src\Plugins\BotSharp.Plugin.MongoStorage\BotSharp.Plugin.MongoStorage.csproj", "{DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -193,14 +193,14 @@ Global {631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|Any CPU.Build.0 = Release|Any CPU {631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|x64.ActiveCfg = Release|Any CPU {631D9C12-86C4-44F0-99C3-D32C0754BF37}.Release|x64.Build.0 = Release|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Debug|Any CPU.Build.0 = Debug|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Debug|x64.ActiveCfg = Debug|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Debug|x64.Build.0 = Debug|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Release|Any CPU.ActiveCfg = Release|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Release|Any CPU.Build.0 = Release|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Release|x64.ActiveCfg = Release|Any CPU - {5AEB21CB-02C1-4678-91FA-554EC55E9467}.Release|x64.Build.0 = Release|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|x64.ActiveCfg = Debug|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Debug|x64.Build.0 = Debug|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|Any CPU.Build.0 = Release|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|x64.ActiveCfg = Release|Any CPU + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -228,7 +228,7 @@ Global {51AFE054-AE99-497D-A593-69BAEFB5106F} = {2635EC9B-2E5F-4313-AC21-0B847F31F36C} {631D9C12-86C4-44F0-99C3-D32C0754BF37} = {51AFE054-AE99-497D-A593-69BAEFB5106F} {5CD330E1-9E5A-4112-8346-6E31CA98EF78} = {2635EC9B-2E5F-4313-AC21-0B847F31F36C} - {5AEB21CB-02C1-4678-91FA-554EC55E9467} = {5CD330E1-9E5A-4112-8346-6E31CA98EF78} + {DB3DE37B-1208-4ED3-9615-A52AD0AAD69C} = {5CD330E1-9E5A-4112-8346-6E31CA98EF78} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {A9969D89-C98B-40A5-A12B-FC87E55B3A19} diff --git a/src/Infrastructure/BotSharp.Abstraction/Repositories/MyDatabaseSettings.cs b/src/Infrastructure/BotSharp.Abstraction/Repositories/BotSharpDatabaseSettings.cs similarity index 88% rename from src/Infrastructure/BotSharp.Abstraction/Repositories/MyDatabaseSettings.cs rename to src/Infrastructure/BotSharp.Abstraction/Repositories/BotSharpDatabaseSettings.cs index afa3a6c6..54cabe8b 100644 --- a/src/Infrastructure/BotSharp.Abstraction/Repositories/MyDatabaseSettings.cs +++ b/src/Infrastructure/BotSharp.Abstraction/Repositories/BotSharpDatabaseSettings.cs @@ -1,6 +1,6 @@ namespace BotSharp.Abstraction.Repositories; -public class MyDatabaseSettings : DatabaseSettings +public class BotSharpDatabaseSettings : DatabaseBasicSettings { public string[] Assemblies { get; set; } public string FileRepository { get; set; } @@ -8,7 +8,7 @@ public class MyDatabaseSettings : DatabaseSettings public DbConnectionSetting BotSharp { get; set; } } -public class DatabaseSettings +public class DatabaseBasicSettings { public string Default { get; set; } public DbConnectionSetting DefaultConnection { get; set; } @@ -21,7 +21,6 @@ public class DatabaseSettings public class DbConnectionSetting { public string Master { get; set; } - public string[] Slavers { get; set; } public DbConnectionSetting() diff --git a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.cs b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.cs index 97d14dd8..6e686bab 100644 --- a/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.cs +++ b/src/Infrastructure/BotSharp.Core/Agents/Services/AgentService.cs @@ -24,13 +24,13 @@ public partial class AgentService : IAgentService public string GetDataDir() { - var dbSettings = _services.GetRequiredService(); + var dbSettings = _services.GetRequiredService(); return Path.Combine(dbSettings.FileRepository); } public string GetAgentDataDir(string agentId) { - var dbSettings = _services.GetRequiredService(); + var dbSettings = _services.GetRequiredService(); var dir = Path.Combine(dbSettings.FileRepository, _settings.DataDir, agentId); if (!Directory.Exists(dir)) { diff --git a/src/Infrastructure/BotSharp.Core/BotSharpServiceCollectionExtensions.cs b/src/Infrastructure/BotSharp.Core/BotSharpServiceCollectionExtensions.cs index 45121b49..853205ef 100644 --- a/src/Infrastructure/BotSharp.Core/BotSharpServiceCollectionExtensions.cs +++ b/src/Infrastructure/BotSharp.Core/BotSharpServiceCollectionExtensions.cs @@ -33,11 +33,11 @@ public static class BotSharpServiceCollectionExtensions services.AddScoped(); services.AddScoped(); - var databaseSettings = new DatabaseSettings(); + var databaseSettings = new DatabaseBasicSettings(); config.Bind("Database", databaseSettings); services.AddSingleton((IServiceProvider x) => databaseSettings); - var myDatabaseSettings = new MyDatabaseSettings(); + var myDatabaseSettings = new BotSharpDatabaseSettings(); config.Bind("Database", myDatabaseSettings); services.AddSingleton((IServiceProvider x) => myDatabaseSettings); @@ -72,7 +72,7 @@ public static class BotSharpServiceCollectionExtensions { services.AddScoped(sp => { - var myDatabaseSettings = sp.GetRequiredService(); + var myDatabaseSettings = sp.GetRequiredService(); return DataContextHelper.GetDbContext(myDatabaseSettings, sp); }); @@ -83,7 +83,7 @@ public static class BotSharpServiceCollectionExtensions { services.AddScoped(sp => { - var myDatabaseSettings = sp.GetRequiredService(); + var myDatabaseSettings = sp.GetRequiredService(); return new FileRepository(myDatabaseSettings, sp); }); diff --git a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs index 18b87d98..b5073133 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStateService.cs @@ -17,13 +17,13 @@ public class ConversationStateService : IConversationStateService, IDisposable private readonly IUserIdentity _user; private readonly IBotSharpRepository _db; private ConversationState _state; - private MyDatabaseSettings _dbSettings; + private BotSharpDatabaseSettings _dbSettings; private string _conversationId; private string _file; public ConversationStateService(ILogger logger, IServiceProvider services, - MyDatabaseSettings dbSettings, + BotSharpDatabaseSettings dbSettings, AgentSettings agentSettings, IUserIdentity user, IBotSharpRepository db) @@ -66,12 +66,14 @@ public class ConversationStateService : IConversationStateService, IDisposable _state = new ConversationState(); - _file = GetConversationState(_conversationId); + _file = GetStorageFile(_conversationId); + //_file = GetConversationState(_conversationId); if (_file != null) { - //var dict = File.ReadAllLines(_file); - var dict = _file.SplitByNewLine(); + var dict = File.ReadAllLines(_file); + //var dict = _file.SplitByNewLine(); + foreach (var line in dict) { _state[line.Split('=')[0]] = line.Split('=')[1]; @@ -144,7 +146,7 @@ public class ConversationStateService : IConversationStateService, IDisposable var record = new ConversationRecord() { Id = ObjectId.GenerateNewId().ToString(), - AgentId = _agentSettings.RouterId, + //AgentId = _agentSettings.RouterId, UserId = user?.Id ?? ObjectId.GenerateNewId().ToString(), Title = "New Conversation", Dialog = string.Empty, diff --git a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStorage.cs b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStorage.cs index 13d754f9..de56534b 100644 --- a/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStorage.cs +++ b/src/Infrastructure/BotSharp.Core/Conversations/Services/ConversationStorage.cs @@ -11,12 +11,12 @@ namespace BotSharp.Core.Conversations.Services; public class ConversationStorage : IConversationStorage { - private readonly MyDatabaseSettings _dbSettings; + private readonly BotSharpDatabaseSettings _dbSettings; private readonly AgentSettings _agentSettings; private readonly IServiceProvider _services; private readonly IUserIdentity _user; public ConversationStorage( - MyDatabaseSettings dbSettings, + BotSharpDatabaseSettings dbSettings, AgentSettings agentSettings, IServiceProvider services, IUserIdentity user) @@ -73,8 +73,11 @@ public class ConversationStorage : IConversationStorage public List GetDialogs(string conversationId) { - var conversationFile = GetConversationDialogs(conversationId); - var dialogs = conversationFile.SplitByNewLine(); + var conversationFile = GetStorageFile(conversationId); + var dialogs = File.ReadAllLines(conversationFile); + + //var conversationFile = GetConversationDialogs(conversationId); + //var dialogs = conversationFile.SplitByNewLine(); var results = new List(); for (int i = 0; i < dialogs.Length; i += 2) @@ -102,13 +105,13 @@ public class ConversationStorage : IConversationStorage public void InitStorage(string conversationId) { - //var file = GetStorageFile(conversationId); - //if (!File.Exists(file)) - //{ - // File.WriteAllLines(file, new string[0]); - //} + var file = GetStorageFile(conversationId); + if (!File.Exists(file)) + { + File.WriteAllLines(file, new string[0]); + } - GetConversationDialogs(conversationId); + //GetConversationDialogs(conversationId); } private string GetStorageFile(string conversationId) @@ -131,7 +134,7 @@ public class ConversationStorage : IConversationStorage var record = new ConversationRecord() { Id = ObjectId.GenerateNewId().ToString(), - AgentId = _agentSettings.RouterId, + //AgentId = _agentSettings.RouterId, UserId = user?.Id ?? ObjectId.GenerateNewId().ToString(), Title = "New Conversation" }; diff --git a/src/Infrastructure/BotSharp.Core/Repository/DataContextHelper.cs b/src/Infrastructure/BotSharp.Core/Repository/DataContextHelper.cs index 6cf6069e..28b447c5 100644 --- a/src/Infrastructure/BotSharp.Core/Repository/DataContextHelper.cs +++ b/src/Infrastructure/BotSharp.Core/Repository/DataContextHelper.cs @@ -7,7 +7,7 @@ namespace BotSharp.Core.Repository; public static class DataContextHelper { - public static T GetDbContext(MyDatabaseSettings settings, IServiceProvider serviceProvider) + public static T GetDbContext(BotSharpDatabaseSettings settings, IServiceProvider serviceProvider) where T : Database, new() where Tdb : DataContext { diff --git a/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs b/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs index a34385f5..57d3f8e6 100644 --- a/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs +++ b/src/Infrastructure/BotSharp.Core/Repository/FileRepository.cs @@ -7,11 +7,11 @@ namespace BotSharp.Core.Repository; public class FileRepository : IBotSharpRepository { - private readonly MyDatabaseSettings _dbSettings; + private readonly BotSharpDatabaseSettings _dbSettings; private readonly IServiceProvider _services; private JsonSerializerOptions _options; - public FileRepository(MyDatabaseSettings dbSettings, IServiceProvider services) + public FileRepository(BotSharpDatabaseSettings dbSettings, IServiceProvider services) { _dbSettings = dbSettings; _services = services; diff --git a/src/Infrastructure/BotSharp.Core/Routing/Router.cs b/src/Infrastructure/BotSharp.Core/Routing/Router.cs index c92d26e4..1d3126d0 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/Router.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/Router.cs @@ -32,7 +32,7 @@ public class Router : IAgentRouting public RoutingRecord[] GetRoutingRecords() { var agentSettings = _services.GetRequiredService(); - var dbSettings = _services.GetRequiredService(); + var dbSettings = _services.GetRequiredService(); var filePath = Path.Combine(dbSettings.FileRepository, agentSettings.DataDir, _settings.RouterId, "route.json"); var records = JsonSerializer.Deserialize(File.ReadAllText(filePath)); diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/AgentCollection.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/AgentCollection.cs index 614c43d7..339cf1d1 100644 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/AgentCollection.cs +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/AgentCollection.cs @@ -1,4 +1,4 @@ -namespace BotSharp.Plugin.Mongo.Collections; +namespace BotSharp.Plugin.MongoStorage.Collections; public class AgentCollection : MongoBase { diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/ConversationCollection.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/ConversationCollection.cs index 63bc9dc4..216e14b7 100644 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/ConversationCollection.cs +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/ConversationCollection.cs @@ -1,4 +1,4 @@ -namespace BotSharp.Plugin.Mongo.Collections; +namespace BotSharp.Plugin.MongoStorage.Collections; public class ConversationCollection : MongoBase { diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserAgentCollection.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserAgentCollection.cs index 79822401..3e9f4043 100644 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserAgentCollection.cs +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserAgentCollection.cs @@ -1,4 +1,4 @@ -namespace BotSharp.Plugin.Mongo.Collections; +namespace BotSharp.Plugin.MongoStorage.Collections; public class UserAgentCollection : MongoBase { diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserCollection.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserCollection.cs index 59ec8a0b..4af14a21 100644 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserCollection.cs +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/Collections/UserCollection.cs @@ -1,4 +1,4 @@ -namespace BotSharp.Plugin.Mongo.Collections; +namespace BotSharp.Plugin.MongoStorage.Collections; public class UserCollection : MongoBase { @@ -7,7 +7,7 @@ public class UserCollection : MongoBase public string Email { get; set; } public string Salt { get; set; } public string Password { get; set; } - public string? ExternalId { get; set; } + public string ExternalId { get; set; } public DateTime CreatedTime { get; set; } public DateTime UpdatedTime { get; set; } diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/MongoBase.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/MongoBase.cs index 995401e8..6fcd9348 100644 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/MongoBase.cs +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/MongoBase.cs @@ -1,7 +1,7 @@ using MongoDB.Bson.Serialization.Attributes; using MongoDB.Bson.Serialization.IdGenerators; -namespace BotSharp.Plugin.Mongo; +namespace BotSharp.Plugin.MongoStorage; [BsonIgnoreExtraElements(Inherited = true)] public class MongoBase diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/MongoDbContext.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/MongoDbContext.cs index dee02eeb..5b07791f 100644 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/MongoDbContext.cs +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/MongoDbContext.cs @@ -1,6 +1,6 @@ -using BotSharp.Plugin.Mongo.Collections; +using BotSharp.Plugin.MongoStorage.Collections; -namespace BotSharp.Plugin.Mongo; +namespace BotSharp.Plugin.MongoStorage; public class MongoDbContext { diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/MongoRepositoryPlugin.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/MongoRepositoryPlugin.cs deleted file mode 100644 index 75a7cbc9..00000000 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/MongoRepositoryPlugin.cs +++ /dev/null @@ -1,17 +0,0 @@ -using BotSharp.Plugin.Mongo.Repository; - -namespace BotSharp.Plugin.Mongo; - -public class MongoRepositoryPlugin : IBotSharpPlugin -{ - public void RegisterDI(IServiceCollection services, IConfiguration config) - { - services.AddSingleton((IServiceProvider x) => - { - var databaseSettings = x.GetRequiredService(); - return new MongoDbContext(databaseSettings.MongoDb); - }); - - services.AddScoped(); - } -} diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/MongoStoragePlugin.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/MongoStoragePlugin.cs new file mode 100644 index 00000000..12f109b6 --- /dev/null +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/MongoStoragePlugin.cs @@ -0,0 +1,17 @@ +using BotSharp.Plugin.MongoStorage.Repository; + +namespace BotSharp.Plugin.MongoStorage; + +public class MongoStoragePlugin : IBotSharpPlugin +{ + public void RegisterDI(IServiceCollection services, IConfiguration config) + { + //services.AddScoped((IServiceProvider x) => + //{ + // var dbSettings = x.GetRequiredService(); + // return new MongoDbContext(dbSettings.MongoDb); + //}); + + //services.AddScoped(); + } +} diff --git a/src/Plugins/BotSharp.Plugin.MongoStorage/Repository/MongoRepository.cs b/src/Plugins/BotSharp.Plugin.MongoStorage/Repository/MongoRepository.cs index 2ce1433f..af7c5617 100644 --- a/src/Plugins/BotSharp.Plugin.MongoStorage/Repository/MongoRepository.cs +++ b/src/Plugins/BotSharp.Plugin.MongoStorage/Repository/MongoRepository.cs @@ -1,6 +1,6 @@ -using BotSharp.Plugin.Mongo.Collections; +using BotSharp.Plugin.MongoStorage.Collections; -namespace BotSharp.Plugin.Mongo.Repository; +namespace BotSharp.Plugin.MongoStorage.Repository; public class MongoRepository : IBotSharpRepository { diff --git a/src/WebStarter/WebStarter.csproj b/src/WebStarter/WebStarter.csproj index 292e3436..ad32e748 100644 --- a/src/WebStarter/WebStarter.csproj +++ b/src/WebStarter/WebStarter.csproj @@ -42,7 +42,7 @@ - + diff --git a/src/WebStarter/appsettings.json b/src/WebStarter/appsettings.json index 72502bf7..ccb45e79 100644 --- a/src/WebStarter/appsettings.json +++ b/src/WebStarter/appsettings.json @@ -65,9 +65,7 @@ "Database": { "Default": "FileRepository", - "MongoDb": { - "Master": "mongodb://localhost:27017/chat-ui" - }, + "MongoDb": "", "BotSharp": { "Master": "Data Source=(localdb)\\ProjectModels;Initial Catalog=BotSharp;Integrated Security=True;Connect Timeout=30;Encrypt=False;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False", "Slavers": []