Update integration with facebook-messenger docs.
This commit is contained in:
parent
4476485d5d
commit
39f508ae08
75
README.rst
75
README.rst
|
|
@ -24,81 +24,10 @@ Some Features
|
|||
|
||||
Documents
|
||||
---------
|
||||
https://botsharp.readthedocs.io/en/latest
|
||||
Read the docs: https://botsharp.readthedocs.io
|
||||
|
||||
https://github.com/Oceania2018/BotSharp/wiki
|
||||
Github Wiki: https://github.com/Oceania2018/BotSharp/wiki
|
||||
|
||||
QUICK START
|
||||
-----------
|
||||
|
||||
Integrate Rasa UI with botsharp, you can use docker compose to run
|
||||
|
||||
::
|
||||
|
||||
PS D:\BotSharp\> docker-compose -f docker-compose-rasaui.yml up
|
||||
|
||||
|
||||
Building BotSharp
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Make sure the `Microsoft .NET Core`_ build environment is installed.
|
||||
Building solution using dotnet CLI (preferred).
|
||||
|
||||
::
|
||||
|
||||
PS D:\> git clone https://github.com/Oceania2018/BotSharp
|
||||
PS D:\> cd BotSharp
|
||||
PS D:\> dotnet build
|
||||
|
||||
Install in docker container
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
Make sure you've got `Docker`_ installed:
|
||||
|
||||
::
|
||||
|
||||
PS D:\> git clone https://github.com/Oceania2018/BotSharp
|
||||
PS D:\> cd BotSharp
|
||||
|
||||
Build docker image:
|
||||
|
||||
::
|
||||
|
||||
PS D:\BotSharp\> docker build -t botsharp .
|
||||
|
||||
Start a container:
|
||||
|
||||
::
|
||||
|
||||
PS D:\BotSharp\> docker run -it -p 5000:5000 botsharp
|
||||
|
||||
|
||||
|
||||
point your web browser at http://localhost:5001 and enjoy Rasa-UI with Botsharp
|
||||
|
||||
|
||||
Install in NuGet
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
PM> Install-Package BotSharp.Core
|
||||
PM> Install-Package BotSharp.RestApi
|
||||
|
||||
Use BotSharp.NLP as a natural language processing toolkit alone.
|
||||
|
||||
::
|
||||
|
||||
PM> Install-Package BotSharp.NLP
|
||||
|
||||
|
||||
|
||||
Tip Jar
|
||||
-------
|
||||
* Ethereum 0x2FdE97210cd14F6020C67BAFA61d4c227FdC268d
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/Haiping-Chen/Etherscan.NetSDK/master/qr_code_eth.jpg
|
||||
:height: 160px
|
||||
|
||||
.. _Rasa UI: https://github.com/paschmann/rasa-ui
|
||||
.. _Articulate UI: https://spg.ai/projects/articulate
|
||||
.. _Microsoft .NET Core: https://www.microsoft.com/net/download
|
||||
.. _Docker: https://www.docker.com
|
||||
|
|
|
|||
|
|
@ -6,17 +6,54 @@
|
|||
.. image:: https://raw.githubusercontent.com/Oceania2018/BotSharp/master/BotSharp.WebHost/wwwroot/images/BotSharp.png
|
||||
:height: 30px
|
||||
|
||||
.. include:: ../README.rst
|
||||
The Open Source AI Bot Platform Builder for Enterprise
|
||||
======================================================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
*"Conversation as a platform (CaaP) is the future, so it's perfect that we're already offering the whole toolkits to our enterprise developers using the BotSharp Bot Platform Builder to build a CaaP. It opens up as much learning power as possible for your enterprise robots and precisely control every step of the AI processing pipeline."*
|
||||
|
||||
**BotSharp** is an open source machine learning framework for AI Bot platform builder. This project involves natural language understanding, computer vision and audio processing technologies, and aims to promote the development and application of intelligent robot assistants in enterprise information systems. Out-of-the-box machine learning algorithms allow ordinary programmers to develop artificial intelligence applications faster and easier.
|
||||
|
||||
It's witten in C# running on .Net Core that is full cross-platform framework. C# is a enterprise grade programming language which is widely used to code business logic in information management related system. More friendly to corporate developers. BotSharp adopts machine learning algrithm in C/C++ interfaces directly which skips the python interfaces. That will facilitate the feature of the typed language C#, and be more easier when refactoring code in system scope.
|
||||
|
||||
Why we do this? because we all know python is not friendly programming language for enterprise developers, it's not only because it's low performance but also it's a type weak language, it will be a disater if you use python to build your bussiness system.
|
||||
|
||||
BotSharp is in accordance with components princple strictly, decouples every part that needed in the platform builder. So you can choose different UI/UX, or pick up a different NLP Tagger, or select a more advanced algrithm to do NER task. They are all modulized based an unfied interfaces.
|
||||
|
||||
Some Features
|
||||
-------------
|
||||
|
||||
* Built-in multi-Agents management, easy to build Bot as a Service platform.
|
||||
* Context In/ Out with lifespan to make conversion flow be controllable.
|
||||
* Use the natural language processing pipeline mechanism and the popular NLP algorithm library to build your own unique robot processing flow.
|
||||
* Support export/ import agent from other bot platforms directly.
|
||||
* Support different UI providers like `Rasa UI`_ and `Articulate UI`_.
|
||||
* Support for multiple data request and response formats such as Rasa NLU and Dialogflow.
|
||||
* Integrate with popular social platforms like Facebook Messenger, Slack and Telegram.
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
The main documentation for the site is organized into a couple sections:
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`User Documentation <user-docs>`
|
||||
* :ref:`Integration Documentation <integration-docs>`
|
||||
* :ref:`search`
|
||||
|
||||
.. _user-docs:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: User Documentation:
|
||||
|
||||
installation
|
||||
|
||||
.. _integration-docs:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Integration Documentation:
|
||||
|
||||
integrations/facebook-messenger
|
||||
|
||||
|
||||
.. _Rasa UI: https://github.com/paschmann/rasa-ui
|
||||
.. _Articulate UI: https://spg.ai/projects/articulate
|
||||
|
|
|
|||
71
docs/installation.rst
Normal file
71
docs/installation.rst
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
Installation
|
||||
============
|
||||
BotSharp strictly follows the modular design principle and adopts a structure in which views and logic are separated.
|
||||
So you can choose the front-end Bot design and management interface.
|
||||
If you want to use the `RASA UI`_ as a front end, you can use the rasaui-specific compose file to quickly experience BotSharp.
|
||||
|
||||
Docker Composer
|
||||
^^^^^^^^^^^^^^^
|
||||
Integrate with `Rasa UI`_, you can use docker compose to run.
|
||||
Make sure you've got `Docker`_ installed.
|
||||
|
||||
::
|
||||
|
||||
PS D:\BotSharp\> docker-compose -f docker-compose-rasaui.yml up
|
||||
|
||||
Point your web browser at http://localhost:5001 and enjoy Rasa-UI with BotSharp.
|
||||
|
||||
Building BotSharp
|
||||
^^^^^^^^^^^^^^^^^
|
||||
Make sure the `Microsoft .NET Core`_ build environment is installed.
|
||||
Building solution using dotnet CLI (preferred).
|
||||
|
||||
::
|
||||
|
||||
PS D:\> git clone https://github.com/Oceania2018/BotSharp
|
||||
PS D:\> cd BotSharp
|
||||
PS D:\> dotnet build
|
||||
|
||||
Install in docker container
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
PS D:\> git clone https://github.com/Oceania2018/BotSharp
|
||||
PS D:\> cd BotSharp
|
||||
|
||||
Build docker image:
|
||||
|
||||
::
|
||||
|
||||
PS D:\BotSharp\> docker build -t botsharp .
|
||||
|
||||
Start a container:
|
||||
|
||||
::
|
||||
|
||||
PS D:\BotSharp\> docker run -it -p 5000:5000 botsharp
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Install in NuGet
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
::
|
||||
|
||||
PM> Install-Package BotSharp.Core
|
||||
PM> Install-Package BotSharp.RestApi
|
||||
|
||||
Use BotSharp.NLP as a natural language processing toolkit alone.
|
||||
|
||||
::
|
||||
|
||||
PM> Install-Package BotSharp.NLP
|
||||
|
||||
|
||||
.. _Rasa UI: https://github.com/paschmann/rasa-ui
|
||||
.. _Articulate UI: https://spg.ai/projects/articulate
|
||||
.. _Microsoft .NET Core: https://www.microsoft.com/net/download
|
||||
.. _Docker: https://www.docker.com
|
||||
56
docs/integrations/facebook-messenger.rst
Normal file
56
docs/integrations/facebook-messenger.rst
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
Facebook Messenger
|
||||
==================
|
||||
|
||||
The BotSharp Facebook integration allows you to easily create a Facebook Messenger bot with natural language understanding, based on the BotSharp technology.
|
||||
|
||||
**Setting Up Facebook**
|
||||
|
||||
In order to set up the Facebook integration for your agent, you'll need the following:
|
||||
|
||||
* A Facebook account
|
||||
|
||||
* A Facebook page to add your agent to
|
||||
|
||||
When a user visits your page and sends you a message, they'll be talking to your agent.
|
||||
|
||||
**Create a Facebook App**
|
||||
|
||||
1. Log into the `Facebook Developer Console`_.
|
||||
2. Click on **My Apps** in the upper right hand corner.
|
||||
3. Click on **Add a New App** and enter a display name and contact email.
|
||||
4. Click **Create App ID**.
|
||||
5. On the next page, click the **Set up** button for the **Messenger** option.
|
||||
6. Under the **Token Generation** section, choose one of your Facebook pages (**Create a new page** if not exist).
|
||||
|
||||
This will generate a **Page Access Token**. Keep this token handy, as you'll need to enter it in BotSharp.
|
||||
|
||||
**Setting Up BotSharp**
|
||||
|
||||
1. Click on the Integrations option in the left menu and switch on Facebook Messenger. In the dialog that opens, enter the following information:
|
||||
* **Verify Token** - This can be any string and is solely for your purposes
|
||||
* **Page Access Token** - Enter the token generated in the Facebook Developer Console
|
||||
2. Or edit agents.json under App_Data\DbInitializer\Agents, update **Page Access Token** and **Verify Token**.
|
||||
3. Click the **Start** button.
|
||||
|
||||
**Webhook Configuration**
|
||||
|
||||
To configure your agent's webhook, return to the Facebook Developer Console:
|
||||
|
||||
1. Click the Setup Webhooks button under the Webhooks section and enter the following information:
|
||||
* **Callback URL** - This is the URL provided on the Facebook Messenger integration page
|
||||
* **Verify Token** - This is the token you created
|
||||
* Check the **messages** and **messaging_postbacks** options under Subscription Fields
|
||||
2. Click the **Verify and Save** button.
|
||||
|
||||
**Testing**
|
||||
|
||||
In order to make your agent available for testing, you'll need to make your app public:
|
||||
|
||||
1. Click on **App Review** in the left menu of the Facebook Developer Console.
|
||||
2. Click on the switch under **Make APP_NAME public**? You'll be prompted to choose a category for your app.
|
||||
3. Choose **Apps for Messenger** from the list
|
||||
4. Click the **Confirm** button.
|
||||
|
||||
You will also need to set a username for your page. This is the username users will chat with when using your agent. To set the username, click the **Create Page @Username** link under your page's profile picture and title.
|
||||
|
||||
.. _Facebook Developer Console: https://developers.facebook.com
|
||||
Loading…
Reference in a new issue