diff --git a/BotSharp.Voice/BotSharp.Voice.csproj b/BotSharp.Voice/BotSharp.Voice.csproj
index 3263df5a..d7e5f176 100644
--- a/BotSharp.Voice/BotSharp.Voice.csproj
+++ b/BotSharp.Voice/BotSharp.Voice.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/BotSharp.WebHost/BotSharp.WebHost.csproj b/BotSharp.WebHost/BotSharp.WebHost.csproj
index 1186a617..86925ced 100644
--- a/BotSharp.WebHost/BotSharp.WebHost.csproj
+++ b/BotSharp.WebHost/BotSharp.WebHost.csproj
@@ -22,7 +22,7 @@
- DEBUG;TRACE;ARTICULATE
+ TRACE;DEBUG
false
@@ -78,6 +78,30 @@
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+ PreserveNewest
+
+
+
PreserveNewest
diff --git a/BotSharp.WebHost/Program.cs b/BotSharp.WebHost/Program.cs
index 9b1daf36..c03fcd8d 100644
--- a/BotSharp.WebHost/Program.cs
+++ b/BotSharp.WebHost/Program.cs
@@ -18,16 +18,27 @@ namespace BotSharp.WebHost
.ConfigureAppConfiguration((hostingContext, config) =>
{
var env = hostingContext.HostingEnvironment;
+ Console.WriteLine($"ContentRootPath: {env.ContentRootPath}");
string dir = Path.GetFullPath(env.ContentRootPath);
string settingsFolder = Path.Combine(dir, "Settings");
+ // locate setting folder
if (!Directory.Exists(settingsFolder))
{
dir = Path.GetFullPath(env.ContentRootPath + "/..");
}
settingsFolder = Path.Combine(dir, "Settings");
+
+ if (!Directory.Exists(settingsFolder))
+ {
+ dir = Path.GetFullPath(env.ContentRootPath + "/bin");
+ }
+
+ settingsFolder = Path.Combine(dir, "Settings");
+
Console.WriteLine($"Read settings from {settingsFolder}");
+
var settings = Directory.GetFiles(settingsFolder, "*.json");
settings.ToList().ForEach(setting =>
{
diff --git a/README.rst b/README.rst
index dcb35a7a..c2a626ee 100644
--- a/README.rst
+++ b/README.rst
@@ -1,7 +1,3 @@
-.. raw:: html
-
-
-
The Open Source AI Bot Platform Builder
======================================================
@@ -19,6 +15,10 @@ The Open Source AI Bot Platform Builder
:target: `botsharpnuget`_
:alt: NuGet
+.. raw:: html
+
+
+
This project is for learning purposes only, please do not use it in a production environment.
**********************************************************************************************
@@ -81,7 +81,7 @@ Scan to join group in Wechat
.. _Docker: https://www.docker.com
.. _Rasa UI: https://github.com/paschmann/rasa-ui
-.. _Articulate UI: https://spg.ai/projects/articulate
+.. _Articulate UI: https://github.com/Oceania2018/articulate-ui
.. _gitter: https://gitter.im/botsharpcore/Lobby
.. _license: https://raw.githubusercontent.com/Oceania2018/BotSharp/master/LICENSE
.. _botsharpnuget: https://www.nuget.org/packages/BotSharp.Core
diff --git a/docs/configuration/db.rst b/docs/configuration/db.rst
new file mode 100644
index 00000000..ec9718f2
--- /dev/null
+++ b/docs/configuration/db.rst
@@ -0,0 +1,16 @@
+Database Settings
+=================
+
+::
+
+{
+ "Database": {
+ "Default": "Redis",
+ "ConnectionStrings": {
+ "InMemory": "DataSource=:memory:",
+ "Redis": "127.0.0.1:6379,defaultDatabase=BotSharp,poolsize=50,ssl=false,writeBuffer=10240,prefix=agent_",
+ "Sqlite": "Data Source=|DataDirectory|BotSharp.db;",
+ "SqlServer": "Data Source=(localdb)\\MSSQLLocalDB;Initial Catalog=BotSharp;Integrated Security=True;Connect Timeout=15;Encrypt=False;TrustServerCertificate=True;ApplicationIntent=ReadWrite;MultiSubnetFailover=False"
+ }
+ }
+}
\ No newline at end of file
diff --git a/docs/configuration/platform.rst b/docs/configuration/platform.rst
new file mode 100644
index 00000000..c573c586
--- /dev/null
+++ b/docs/configuration/platform.rst
@@ -0,0 +1,57 @@
+Platform Settings
+=================
+
+* app.json
+
+::
+
+{
+ "Assemblies": "BotSharp.Core",
+ "BotPlatform": "BotSharpAi",
+ "Version": "0.1.0",
+
+ "MachineLearning": {
+ "dataDir": "D:\\Projects\\BotSharp\\Data"
+ }
+}
+
+
+* BotSharpAi.json
+
+::
+
+{
+ "BotSharpAi": {
+ "Lang": "en",
+
+ "Provider": "BotSharpProvider",
+ "BotSharpProvider": {
+ },
+
+ "Pipe": "BotSharpTokenizer, BotSharpTagger, BotSharpCRFNer, BotSharpIntentClassifier",
+
+ "BotSharpTokenizer": {
+ "tokenizer": "TreebankTokenizer"
+ },
+
+ "BotSharpIntentClassifier": {
+ "classifer": "SVMClassifier"
+ },
+
+ "BotSharpTagger": {
+ "tagger": "NGramTagger"
+ },
+
+ "BotSharpCRFNer": {
+ "template": "|App_Data|CRFLite/template.en"
+ },
+
+ "WitAiEntityRecognizer": {
+ "url": "https://api.wit.ai",
+ "resource": "message",
+ "serverAccessToken": "SERVER_ACCESS_TOKEN",
+ "version": "20180811"
+ }
+ }
+}
+
diff --git a/docs/index.rst b/docs/index.rst
index d90292d7..5d17ce69 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -44,12 +44,13 @@ The main documentation for the site is organized into a couple sections:
* :ref:`User Documentation `
* :ref:`Integration Documentation `
* :ref:`NLP Documentation `
+* :ref:`Architecture Documentation `
* :ref:`search`
.. _user-docs:
.. toctree::
- :maxdepth: 2
+ :maxdepth: 3
:caption: User Documentation:
installation
@@ -69,10 +70,19 @@ The main documentation for the site is organized into a couple sections:
integrations/telegram
integrations/skype
+.. _architecture-docs:
+
+.. toctree::
+ :maxdepth: 3
+ :caption: Architecture Documentation:
+
+ configuration/db
+ configuration/platform
+
.. _nlp-docs:
.. toctree::
- :maxdepth: 2
+ :maxdepth: 3
:caption: NLP Documentation:
models/crf
@@ -85,5 +95,5 @@ The main documentation for the site is organized into a couple sections:
If you feel that this project is helpful to you, please Star us on the project, we will be very grateful.
.. _Rasa UI: https://github.com/paschmann/rasa-ui
-.. _Articulate UI: https://spg.ai/projects/articulate
+.. _Articulate UI: https://github.com/Oceania2018/articulate-ui
.. _gitter: https://gitter.im/botsharpcore/Lobby
\ No newline at end of file
diff --git a/docs/installation.rst b/docs/installation.rst
index 949ddc27..cc7ec054 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -38,19 +38,41 @@ Point your web browser at http://localhost:5001 and enjoy Rasa-UI with BotSharp.
4. Integrate with `Rasa Talk`_
-Building BotSharp
-^^^^^^^^^^^^^^^^^
+Building & Run locally
+^^^^^^^^^^^^^^^^^^^^^^
If you are a .NET developer and want to develop extensions or fix bug for BotSharp, you would CTRL + F5 to run it locally in debug mode.
-Make sure the `Microsoft .NET Core`_ build environment is installed.
+Make sure the `Microsoft .NET Core`_ build environment and `Node.js`_ is installed.
Building solution using dotnet CLI (preferred).
+* Build NLU API
::
PS D:\> git clone https://github.com/Oceania2018/BotSharp
PS D:\> cd BotSharp
- PS D:\> dotnet build
+ PS D:\> dotnet build -v m -o ../bin -c ARTICULATE
+ PS D:\> dotnet bin\BotSharp.WebHost.dll
-Install in docker container
+If you don't have Redis installed, please update ArticulateAi.json:
+
+::
+
+"AgentStorage": "AgentStorageInRedis"
+
+to
+
+::
+
+"AgentStorage": "AgentStorageInMemory"
+
+* Build Chatbot Designer
+::
+
+ PS D:\> git clone https://github.com/Oceania2018/articulate-ui
+ PS D:\> cd articulate-ui
+ PS D:\> npm install
+ PS D:\> npm start
+
+Building docker image
^^^^^^^^^^^^^^^^^^^^^^^^^^^
If you just want to run BotSharp as a backend NLU engine, you can run it standalone in docker.
@@ -100,9 +122,10 @@ Use BotSharp.NLP as a natural language processing toolkit alone.
.. _Botpress: https://github.com/botpress/botpress
.. _Rasa UI: https://github.com/paschmann/rasa-ui
-.. _Articulate UI: https://spg.ai/projects/articulate
+.. _Articulate UI: https://github.com/Oceania2018/articulate-ui
.. _Rasa Talk: https://github.com/jackdh/RasaTalk
.. _Microsoft .NET Core: https://www.microsoft.com/net/download
+.. _Node.js: https://nodejs.org
.. _Docker: https://www.docker.com
.. |APIHomeScreenshot| image:: /static/screenshots/APIHome.png