diff --git a/docs/analytics/analytics.md b/docs/analytics/analytics.md new file mode 100644 index 0000000..7943007 --- /dev/null +++ b/docs/analytics/analytics.md @@ -0,0 +1,52 @@ +--- +title: Overview +hide_title: true +--- + +# Analytics + +![Messaging channels](/img/docs/analytics.png) + +Analytics is available only for an activated bot, it holds infromation about the usage and performance of your bot. Analytics tab is per bot and it shows a dashboard that holds graphs, numbers and indexes about for the selected period. + + + +## Selected Period +You can change the selected period to focus on specific period details. By default it is set for the past week, you are still able to change it. + + + +## Total Users +The absolute total number of users during the selected period. Next to it an index that show the percentage of increase/decrease in the total users using the chatbot compared to previous priod(s). + + + + +## New users +The absolute number of new users during the selected period. Next to it an index that show the percentage of increase/decrease in the new users using the chatbot compared to previous priod(s). + + + + +## Returning Users +The absolute number of returning users during the selected period. Next to it an index that show the percentage of increase/decrease in the returning users using the chatbot compared to previous priod(s). + + + + +## Session +The absolute number of session/conversations opened with the chatbot during the selected period. Next to it an index that show the percentage of increase/decrease in the number of the opened sessios compared to previous priod(s). + + + + +## Messages +The absolute number of messages sent to the chatbot during the selected period. Next to it an index that show the percentage of increase/decrease in the number of the messages sent to the chatbot compared to previous priod(s). + + + + +## Overall Dashboard +This graph shows the relation between users, sessions and messages over a period of time. + diff --git a/docs/building-chatbots/creating-a-new-bot.md b/docs/building-chatbots/creating-a-new-bot.md deleted file mode 100644 index 8be57ed..0000000 --- a/docs/building-chatbots/creating-a-new-bot.md +++ /dev/null @@ -1,142 +0,0 @@ ---- -id: creating-a-new-bot -title: Creating a New Bot ---- - --------------------- - -Creating a chatbot with Botpress is very straight forward and can be done by technical and non-technical people. It only take a few steps and you're ready to go. - -You can build chatbots to: -- book an event; -- order something; -- welcome your users; -- deflect support cases; -- anything you have in mind. - -## Prerequisites - -You need to: -- [install Botpress](/overview/quickstart/installation); -- register your email address; -- have the right permissions. - -## Creating a Bot - -Now that you have everything you need, let's start with creating a new bot. - -1. Open Botpress. -1. Log in to Botpress. -:::note -The landing page shows all your **Bots**. If you just created the account, there is nothing on the page. -::: -1. At the top right of the page, click **Create Bot**. Then, click **New Bot**. - 1. The **Create a new bot** window appears. - 1. Under **Bot Name**, type the desired name for your bot. It enters the same name in the **Bot Id** box. - :::note - You can change it anytime. Your users can see it. - ::: - 1. Under **Bot Id**, type the desired ID for your bot, if different than your **Bot Name**. The length has to be between 3 and 50 characters, without special characters. - :::caution - The **Bot Id** can't be modified. Your users can see it in the URL bar. - ::: - 1. Under **Bot Template**, you can select the bot you want to create: - - **Welcome Bot**: a chatbot that helps you start your Botpress journey. - - **Small Talk**: a chatbotbot that is essentially made of Q&As. - - **Empty Bot**: a brand-new chatbot that you start from scratch. - - **Learn Botpress Basics**: a complete chatbot that you can create while following [these instructions](https://botpress.com/mars-rover-tutorials) or analyze the content. - - **Weather Bot**: a chatbot that gives you the current weather in a given city. Follow [these instructions](https://github.com/botpress/botpress/tree/master/modules/examples#weatherbot) to make it work. - 1. Click **Create Bot**. -1. Now that your bot is created, you will be redirected to the **Bots** page. -1. Click the name of your bot, and be creative! - -## Bot Options - -In your **Bots** page, next to the name of your bot, you have three buttons that you can click: - -### Config - -Clicking this button redirects you to the **Bot Configuration** page, where you have three tabs: - -#### General - -The **General** page is where you can change: - -- the name of your bot; -- the status: published (visible to everyone), collaborators only (only visible to collaborators), unmounted (not visible to anyone); -- the description of your bot; -- the default language: Arabic, Dutch, English, French, German, Hebrew, Italian, Japanese, Polish, Portuguese, Russian, Spanish; -- the supported languages (see default languages). - -#### Additional Details - -The **Additional Details** page shows all the details about the owner of the bot: - -- website; -- phone number; -- contact e-mail; -- link to terms and conditions; -- link to privacy policy. - -#### Avatar & Cover Picture - -The **Avatar & Cover Picture** page is where you can change: - -- your bot avatar; -- your cover picture. - -### Open Chat - -Clicking the **Open Chat** button redirects you to the chatbot. It's what your users see when they chat with your bot, with your customizations. - -### Others (the three lines) - -Clicking this button opens a menu where you can choose between: - -#### Apps - -The **Apps** menu gives you three options: - -- **Analytics**; -- **[HITL Next](/chatbot-management/agent-handover/human-in-the-loop/hitlnext)**; -- **[Misunderstood](/chatbot-management/language-understanding/misunderstood)**. - -#### Edit in Studio - -The **Edit in Studio** buttons redirects you to the [Conversation Studio](/overview/quickstart/conversation-studio). - -#### Copy Link to Clipboard - -The **Copy Link to Clipboard** button copies the URL of your chatbot so you can paste it somewhere. - -#### View Logs - -The **View Logs** buttons redirects you to the **Logs** tab in the [Conversation Studio](/overview/quickstart/conversation-studio). - -#### Create Revision - -The **Create Revision** button allows you to save a copy of your chatbot at a precise time. This allows you to test whatever you want and [rollback](#rollback) to the last revision version, if needed. - -#### Rollback - -:::info -You must have [revisions](#create-revision) if you want to use the **Rollback** option. -::: - -The **Rollback** button allows you to go back to an older version that you saved with the **[Create Revision](#create-revision)** button. When clicking it, a new windows appears where you can select the revision you want. You must check the box before clicking **Rollback**. - -:::caution -This overwrites all the work you have done after saving your revision. -::: - -#### Export - -The **Export** button allows you to export a `.tgz` file and save it on your computer so you can import it later. - -#### Delete - -The **Delete** button deletes your bot forever. A message will appear so you can be sure you want to delete the selected bot. - -:::danger -Deleting a bot can't be undone. -::: \ No newline at end of file diff --git a/docs/building-chatbots/developers/code-execution/SDK.md b/docs/building-chatbots/developers/code-execution/SDK.md deleted file mode 100644 index d35e60c..0000000 --- a/docs/building-chatbots/developers/code-execution/SDK.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -id: sdk -title: SDK ---- - --------------------- - -To access the SDK reference page, follow this link: https://botpress.com/reference/. - -## jumpTo - -The flow-editor allows you to visually design the flow of the conversation. However, it may be easier for you to jump to a specific conversation node programmatically, when a specific set of conditions is met. - -```js -// This should be located inside a hook -const sessionId = bp.dialog.createId(event) -await bp.dialog.jumpTo(sessionId, event, 'main.flow.json', 'target-node') -``` - -As can be seen in the above example, the `jumpTo` method takes 4 arguments: - -- the session id; -- the event; -- the target flow name; -- the target node name (optional - by default it is flow.startNode). diff --git a/docs/building-chatbots/developers/custom-modules.md b/docs/building-chatbots/developers/custom-modules.md deleted file mode 100644 index d8d2c98..0000000 --- a/docs/building-chatbots/developers/custom-modules.md +++ /dev/null @@ -1,572 +0,0 @@ ---- -id: custom-modules -title: Custom Modules ---- - --------------------- - -## Module Templates - -To help you get started, two templates are available: [Module Templates](https://github.com/botpress/botpress/tree/master/examples/module-templates). - -1. Copy the template of your choice. -1. Paste it in `modules/`. -1. In your `botpress.config.json`, enable the module. - -## Module Structure - -This is the basic structure that your module should have. Files or folders followed by a question mark are optional and discussed more thoroughly below. - -```bash -module-directory -├── build.extras.js? -├── package.json -└── src - ├── actions? - ├── backend - │ └── index.ts - ├── config.ts? - └── views - └── index.jsx -``` - -## Module Builder - -It's the only dependency you have to add in your dev-dependencies. It handles typescript compilation, webpack setup and compilation, packaging for distribution, etc... Here's how to get started: - -1. Add the `module-builder` as a dependency: - -```js -"devDependencies": { - "module-builder": "../../build/module-builder" -} -``` - -2. Add those scripts commands: - -```js -"scripts": { - "build": "./node_modules/.bin/module-builder build", - "watch": "./node_modules/.bin/module-builder watch", - "package": "./node_modules/.bin/module-builder package" -} -``` - -Then you can build your module using `yarn build`. - -## Local Development Tips - -In order to have code changes automatically recompiled, you need to first run `yarn cmd dev:modules` (run `yarn cmd default` to get full documentation for other useful commands). Restart server to apply backend changes and refresh your browser for UI changes. - -Then, you can type `cd modules/your-module` and start a `yarn watch` process in another terminal. This will process will recompile your module's code. - -To regenerate the `config.schema.json` file for your module, you need to run `yarn build` from the module directory. - -Once your module is ready to be deployed, from your module's directory, run `yarn build && yarn package`. This will generate a `.tgz` archive containing your compiled module. - -### Overriding Webpack Options - -It is possible to override webpack parameters by adding a "webpack" property to the `package.json` file of your module. When you override a property, you also remove the default settings that we've set, so we recommend adding them back when overriding. For example, if you want to add an additional external file: - - -**Example:** - -```js -"webpack": { - "externals": { - //These 3 are included by default - "react": "React", - "react-dom": "ReactDOM", - "react-bootstrap": "ReactBootstrap", - - //Your new addition: - "botpress/content-picker": "BotpressContentPicker" - } -} -``` - -### Copying Extra Files - -When you package your modules, only the files in the `dist` folder are included in the zip, plus production-optimized `node_modules`. - -If you want to add special files to that folder (for example, copy automatically some files not handled by webpack), you need to add a simple file named `build.extras.js` at the root of your module (at the same level as `package.json`). - -Your file needs to export an array named `copyFiles` containing the paths to move. It keeps the same folder structure, only changing `src` for `dist`. - - -**Example:** - -`build.extras.js` - -```js -module.exports = { - copyFiles: ['src/backend/somefolder/myfile_*', 'src/backend/binary/*'] -} -``` - -## Module Entry Point - -This is where you define how Botpress will interact with your module. Your `index.ts` file must export an `sdk.ModuleEntryPoint` object. - -:::tip -Keep your `index.ts` file small and split your module's logic in multiple files. -::: - -We will explore each property below. - - -**Example:** - -```js -const entryPoint: sdk.ModuleEntryPoint = { - onServerStarted, - onServerReady, - onBotMount, - onBotUnmount, - onFlowChanged, - skills, - botTemplates, - definition: { - name: 'my-module', - menuIcon: 'some-icon', - menuText: '', - fullName: 'My Module', - homepage: 'https://botpress.com', - noInterface: false, - plugins: [] - } -} - -export default entryPoint -``` - -### onServerStarted - -This method is called as soon as the bot is starting up. The server is not available at that time, and calls to other API will fail. This is usually used to set up database connection, which you can access via Knex (`bp.database`). - -**Example:** - -```js -const onServerStarted = async (bp: SDK) => { - await db(bp) -} -``` - -### onServerReady - -This is called once all modules are initialized and when the server is listening for incoming connections. - -Usually you will setup your [API endpoint](#api-endpoint) here. - -**Example:** - -```js -const onServerReady = async (bp: SDK) => { - await api(bp) -} -``` - -### onBotMount && onBotUnmount - -These methods are called every time a bot is started or stopped (either when starting Botpress or when creating or deleting a bot). - -**Example:** - -```js -const botScopedStorage: Map = new Map() - -const onBotMount = async (bp: SDK, botId: string) => { - const storage = new MyStorage(bp, botId) - - botScopedStorage.set(botId, storage) -} - -const onBotUnmount = async (botId: string) => { - botScopedStorage.delete(botId, storage) -} -``` - -### onFlowChanged - -This method is called whenever a node is renamed in a flow. This allows you to update your module's data so you are up-to-date with the new changes. For more information on how to implement this method, please refer yourself to our implementation in the [QNA Module](https://github.com/botpress/botpress/blob/master/modules/qna/src/backend/index.ts) - -**Example:** - -```js -const onFlowChanged = async (bp: SDK, botId: string, flow: Flow) => { - ... -} -``` - -### skills - -When you create new skills, they need a way to generate the custom flow that will be used by the dialog engine. Skills defined here will be displayed in the flow editor in the dropdown menu. - -**Example:** - -```js -const skillsToRegister: sdk.Skill[] = [ - { - id: 'Choice', // This must be the name of the component exported in your module full view - name: 'Choice', // This is the value displayed to the user - flowGenerator: choice.generateFlow - } -] -``` - -### botTemplates - -Templates allow you to create a new bot without starting from scratch. They can include about anything, like content elements, flows, NLU intents, QNAs, etc. - -**Example:** - -```js -const botTemplates: sdk.BotTemplate[] = [ - { - id: 'welcome-bot', - name: 'Welcome Bot', - desc: 'This is a demonstration bot to showcase some capabilities' - } -] -``` - -### Definition - -The definition is used by Botpress to setup your module. - -Please refer to the [SDK Reference](https://botpress.com/reference/) for information on the possible options. - -The only way to communicate with modules (or between them) is by using the API endpoint. - -All modules are isolated and receive their own instance of `bp`. - -## API Endpoint - -The only way to communicate with modules (or between them) is by using the API endpoint. - -All modules are isolated and receive their own instance of `bp`. - -### Consuming API Externally or From Another Module - -The Botpress SDK exposes a method to get the axios headers for a request. It will automatically set the base URL for the request and the required headers to communicate with the specific bot. This method is `bp.http.getAxiosConfigForBot('bot123'): Promise`. - -The method also accepts a second parameter with additional options. Right now, the only available option is `localUrl`. When set to true, the module will communicate with the local URL instead of the external one. - - -**Example:** - -`bp.http.getAxiosConfigForBot('bot123', { localUrl: true })` - -Once you have this, you simply have to call the axios method of your choice, and add the config as the last parameter. - -**Example:** - -```js -extractNluContent: async () => { - const axiosConfig = await bp.http.getAxiosConfigForBot(event.botId) - const text = event.payload.text - const data = await axios.post(`/mod/nlu/extract`, { text }, axiosConfig) -} -``` - -### Consuming API From Your Module's Views - -When a user is using your module's interface, a bot is already selected so you just need to call `bp.axios`. It is always passed down to your react components as a property. - -**Example:** - -```JS -const result = await this.props.bp.axios.get('/mod/my-module/query') -``` - -### Creating an API Endpoint - -Modules are global, as is the API, so they must be able to manage multiple bots. - -:::tip -Set up the API route in the `onServerReady` method of your entry point. -::: - -The bot ID targeted by the request is always available via `req.params.botId`. - -Setting up an API is very easy: - -```js -const router = bp.http.createRouterForBot('dialog-sessions') - -router.get('/count', async (req, res) => { - const botId = req.params.botId - - const { dialogSessions } = await knex('dialog_sessions') - .count('id as dialogSessions') - .where({ botId }) - .first() - - res.send({ dialogSessions }) -}) -``` - -In the example above, we added a route handler that will be available via `/mod/dialog-sessions/count` which fetches data from the database and returns the data as json. - -## Configuration - -Module configuration is handled automatically by Botpress (saving and loading). All you need to do is add a file named `config.ts` in your bot `src` folder. This file should be written in typescript (so your variables are correctly typed). - -Since an example is worth a thousand words, check out [existing modules configuration files](https://github.com/botpress/botpress/tree/master/modules) to get a better idea. - -## Database - -Botpress officially supports two databases: SQLite or Postgres. Your module can access the bot's database to create and update required tables. - -### Initialization and Table creation - -Tables initialization should be done in the `onServerStarted` block of your `src/backend/index.ts` file. - -`index.ts` - -```js -import Database from './db' - -let db = undefined - -const onServerStarted = async (bp: SDK) => { - db = new Database(bp) - await db.initialize() -} -``` - -`db.ts` - -```js -export default class Database { - knex: any - - constructor(private bp: SDK) { - this.knex = bp.database - } - - initialize() { - if (!this.knex) { - throw new Error('You must initialize the database before') - } - - this.knex.createTableIfNotExists('my_module_db', ...) - } -} -``` - -### Migration - -Database migration isn't available at the moment, it should be added in a future iteration. - -### Knex Extension - -We extended Knex functionality with common features that makes development easier, by handling internally differences between different databases. When accessing `bp.database`, you have access to all the usual Knex commands, plus the following ones: - -#### Check if Using SQlite - -The method `bp.database.isLite` returns true if the database is SQLite. - -#### Table Creation - -Here is a simple example to create your module's table if it is missing: - -Usage: `bp.database.createTableIfNotExists(table_name, data_callback)` - -```js -bp.database - .createTableIfNotExists('my_module_table', function(table) { - table.increments('id').primary() - table.string('type') - table.string('text', 640) - table.jsonb('raw_message') - table.timestamp('ts') - }) - .then(async () => { - // You may chain table creation - }) -``` - -#### Insert and Retrieve - -Inserts the row in the database and returns the inserted row. - -If you omit `returnColumn` or `idColumn`, it will use `id` as the default. - -Usage: `bp.database.insertAndRetrieve(table_name, data, returnColumn?, idColumn?)` - -```js -const someObject = (await bp.database.insertAndRetrieve)( - 'my_module_table', - { - botId: session.botId, - important_data: bp.database.json.set(data || {}), - created_on: bp.database.date.now() - }, - ['botId', 'important_data', 'created_on'] -) -``` - -#### Date Helper - -## Views - -There are two different type of views (or bundles) that your module can offer. A view can consist of multiple components. These components can be used by other modules, and your own module can also consume components of other modules. - -Check out the [Complete Module Example on GitHub](https://github.com/botpress/botpress/tree/master/examples) for more details on how you can implement views. - -### Full View - -This view includes heavy dependencies, like `react-bootstrap`. When you want to add an interface for your module, your full view need to export a `default` component. -The main view of the module is found in the `src/views/full/index.jsx` file by default. - -Skill components must be exported by this view (more on this below). - -### Lite View - -The lite view doesn't include any heavy dependency. Common use case is to add a custom, lightweight component on the web chat. This type of view was added to keep the size of the webchat bundle small so it loads faster, especially on mobile phones. - -### Sharing Components Between Modules - -It is now a lot easier to expose components for other modules or to use other module's components. Here is a quick example on how the webchat is able to display a component from a specific module: - -#### Display a Custom Component Dynamically - -When components are loaded this way, they are loaded and displayed immediately where the tag is placed. - -**Example:** - -```js -// Fetch the module injector. It is available on any of your module's view. -const InjectedModuleView = this.props.bp.getModuleInjector() - -// Use is very straightforward: specify the module name, the name of the component, and if it is available on the lite or full view. - -``` - -#### Load a Module's Components in Memory - -By loading components this way, they aren't displayed immediately on the page. - -They are accessible by using `window.botpress['moduleName']['componentName']`. - -**Example:** - -```js -// The first parameter is the module name, the second specifies if it should load the lite or full view -this.props.bp.loadModuleView(moduleName, true) -``` - -## Skill Creation - -There are a couple of steps required to create a new skill. Basically, a skill consist of a GUI to input values and a flow generator to create the interactions. - -### Step 1 - Create Your Visual Component - -The first step is to create the GUI that will be displayed to the user. You can create your component in the file `views/full/index.jsx`, or you can create it in a separate file, just make sure to export your skill component. - -The name of your component (in the below example, MyCustomSkill) needs to be the same used in step 3 below. - -**Example:** - -```jsx -import React from 'react' - -export class MyCustomSkill extends React.Component { - render() { - return null - } -} -``` - -### Step 2 - Creating the Flow Generator - -The flow generator will create all the transitions and conditions based on the data that was feeded by the GUI. That method will be called by the Studio when the user has finished inputting all his data. Your method will receive a `data` object. and must return a partial flow. - -**Example:** - -```js -const generateFlow = async (data: any, metadata: sdk.FlowGeneratorMetadata): Promise => { - const nodes: sdk.SkillFlowNode[] = [ - { - name: 'entry', - onEnter: [], - next: [{ condition: 'true', node: '...' }] - } - ] - - return { - transitions: createTransitions(data), - flow: { - nodes: nodes, - catchAll: { - next: [] - } - } - } -} - -const createTransitions = data => { - const transitions: sdk.NodeTransition[] = [] - return transitions -} - -export default { generateFlow } -``` - -### Step 3 - Connecting Those Components - -Once your view and the flow generator is ready, you need to inform Botpress about your skill. - -This is how you would register it: - -```js -// Note the array, you can register multiple skills that way -const skillsToRegister: sdk.Skill[] = [ - { - id: 'MyCustomSkill', // Name of your exported component - name: 'My Magic Custom Skill', // Only used to display the skill in the list - flowGenerator: generateFlow - } -] -``` - -```js -const entryPoint: sdk.ModuleEntryPoint = { - ..., - skills: skillsToRegister -} -``` - -## Register Actions - -Modules can register new actions that will be available on the flow editor. - -Those actions must be deployed to the `data/global/actions` folder to be recognized by Botpress. Here is how to do that: - -1. Create a folder named `actions` in `src`. -1. Add your JavaScript files in the folder. -1. When you build your module, your files will be copied in the `dist` folder. -1. At every startup, action files are copied in `data/global/actions/$MY_MODULE/`. - -They are then accessible by the name `$MY_MODULE/$MY_ACTION` in any node or skill. - -If your action requires external dependencies, you must add them on your module's `package.json` as dependencies. When the VM is initialized, we redirect `require` requests to the `node_modules` of its parent module. - -:::note -Many dependencies are already included with Botpress and do not need to be added to your package (such as lodash, axios, etc.). -::: - -## Module-Builder Docker Image - -We provide a Docker image that can be used to compile your custom module. This is useful in CI/CD situations, where your pipeline will checkout your Custom Module's source code, and the Docker container will spit out a compiled `.tgz` file. - -## Instructions - -In the instructions below, replace `vX_X_X` by the latest version of the Docker image available on Docker Hub: - -``` -docker run -v `pwd`/your-custom-module:/botpress/modules/your-custom-module botpress/module-builder:vX_X_X sh -c 'cd modules/your-custom-module && yarn && yarn build && yarn package' -``` - -The compiled module will be availble in the directory you mounted as a `your-custom-module.tgz` file. diff --git a/docs/building-chatbots/developers/database.md b/docs/building-chatbots/developers/database.md deleted file mode 100644 index 1325436..0000000 --- a/docs/building-chatbots/developers/database.md +++ /dev/null @@ -1,45 +0,0 @@ ---- -id: database -title: Database ---- - --------------------- - -By default, Botpress uses SQLite as its database. However, we recommend that you switch to PostgreSQL as early as you can in your chatbot development cycle because it is highly fault tolerant, stable, scalable, and secure. - -## How to Switch from SQLite to PostgresSQL - -First, make sure you're running PostgreSQL 9.5+ and create your database before starting Botpress. - -Once your database is created, the only thing Botpress needs is a [standard PG connection string](https://www.postgresql.org/docs/current/libpq-connect.html#LIBPQ-CONNSTRING) configured in the `DATABASE_URL` environment variables. - -- `DATABASE_URL=postgres://login:password@your-db-host.com:5432/your-db-name` - -If you want to use the default PostgresSQL connection string, set it as follows: - -- `DATABASE_URL=postgres` - -While using PostgresSQL, you can configure the Connection Pools by using the `DATABASE_POOL` environment variable. For detailed options, please refer to [tarn.js](https://github.com/vincit/tarn.js). You must enter valid `json`. - -**Example:** - -`DATABASE_POOL={"min": 3, "max": 10}` - -You can also set the PostgreSQL Schema Search Path for every database connection (official documentation page [here](https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH)) by setting the `DATABASE_PG_SEARCH_PATH` environment variable. - -- `DATABASE_PG_SEARCH_PATH=mySchema` - -This will be the equivalent of using the following SQL statement: `SET search_path to mySchema`. This feature requires you to create the schema prior to setting it. Moreover, although it's not recommended, you can set multiple schemas in your search path using a comma separated value syntax as you would do using the SQL statement. - -If you don't want to type these variables each time you start Botpress, we also support `.env` files. - -## Accessing databases - -Two handy ways to access whichever database you choose to use are: - -- The [key-value store](https://botpress.com/reference/modules/_botpress_sdk_.kvs.html); -- A [knex instance](http://knexjs.org/). - -:::tip -Use either kebab case or snake case when defining tables and columns. However, if you prefer camel case, don't forget to wrap table and column names in "quotes". -::: diff --git a/docs/building-chatbots/developers/hooks/hooks.md b/docs/building-chatbots/developers/hooks/hooks.md deleted file mode 100644 index 24d2641..0000000 --- a/docs/building-chatbots/developers/hooks/hooks.md +++ /dev/null @@ -1,120 +0,0 @@ ---- -id: hooks -title: Hooks ---- - --------------------- - -Hooks are a handy way to execute JavaScript code (similar to that of actions) when specific events occur. - -They are defined globally as JavaScript files in the folder `data/global/hooks/${hookName}`. You can add as many files as you want in this folder; they will be processed sequentially, in alphabetical order. - -:::note -Subfolders are allowed but ignored in the ordering. -::: - -Hooks have access to the [Botpress SDK](https://botpress.com/reference/). - -## Disabling Hooks - -Botpress will ignore files starting with a dot (`.`). This way, you can disable a hook or action by prefixing the file's name with a dot. - -## Types of Hooks - -Hooks are differentiated using the point in the event engine when they are executed. The following are instances where you can inject hooks into your code. - -### After Server Starts - -This event is called once all modules and bots are loaded and the bot is ready to accept incoming connections. - -Location: `data/global/hooks/after_server_start` - -Parameters: `bp` - -### After Bot Mount - -This event is called every time a bot is mounted, be it when the server starts up or when adding new bots at runtime. - -Location: `data/global/hooks/after_bot_mount` - -Parameters: `bp`, `botId` - -### After Bot Unmount - -Every time a bot is unmounted, Botpress calls this event to clean up after deleting a bot. - -Location: `data/global/hooks/after_bot_unmount` - -Parameters: `bp`, `botId` - -### Before Incoming Middleware - -Botpress calls this hook after receiving an event but before processing any middleware. It is possible to change event properties. - -Location: `data/global/hooks/before_incoming_middleware` - -Parameters: `bp`, `event` - -Botpress often uses this hook to set flags to skip some processing, for example, to prevent the module QNA from processing it when it's a quick reply: - -```js -if (event.type === 'quick_reply') { - event.setFlag(bp.IO.WellKnownFlags.SKIP_QNA_PROCESSING, true) -} -``` - -### After Incoming Middleware - -This hook is called right after all incoming middlewares processed the event but before the Dialog Engine starts processing it. You can access all the required data (including NLU intent) for special processing and decide what happens to the event. - -Location: `data/global/hooks/after_incoming_middleware` - -Parameters: `bp`, `event` - -A typical operation here is to tell Botpress to ignore the event and not process it (e.g., not sending it to the dialog engine). - -Here is an example: - -```js -const messageTypesToDiscard = ['session_reset', 'typing', 'visit', 'session_reference'] - -if (messageTypesToDiscard.includes(event.type)) { - event.setFlag(bp.IO.WellKnownFlags.SKIP_DIALOG_ENGINE, true) -} -``` - -### Before Outgoing Middleware - -The Dialogue Manager calls this hook before the bot's reply is sent to the user. - -Location: `data/global/hooks/before_outgoing_middleware` - -Parameters: `bp`, `event` - -Here you can save the bot's complete response. - -### Before Session Timeout - -This hook is called right before a user timeouts on a node. - -Location: `data/global/hooks/before_session_timeout` - -Parameters: `bp`, `event` - -### Before Conversation End - -This hook is called right before a conversation ends. - -Location: `data/global/hooks/before_conversation_end` - -Parameters: `bp`, `event` - -### Before Suggestions Election - -This hook is called after the Decision Engine Ranking but before the Suggestion Election. Doing so allows you to override the Decision Engine's ranking by directly altering the `event.suggestions` array. - -Location: `data/global/hooks/before_suggestions_election` - -Parameters: `bp`, `event`, `suggestions`, `sessionId` - -A typical operation here is to add a new (elected) suggestion when there is no elected winner. \ No newline at end of file diff --git a/docs/building-chatbots/developers/inter-bot-communication-delegation.md b/docs/building-chatbots/developers/inter-bot-communication-delegation.md deleted file mode 100644 index 1bd1f36..0000000 --- a/docs/building-chatbots/developers/inter-bot-communication-delegation.md +++ /dev/null @@ -1,61 +0,0 @@ ---- -id: inter-bot-communication-delegation -title: Inter-bot Communication / Delegation ---- - --------------------- - -A chatbot can "delegate" questions or tasks to other bots. We call this concept "inter-bot" communication. - -The code for this example is available in the [examples](https://github.com/botpress/botpress/tree/master/examples/interbot) directory of our GitHub repository (update `workspaces.json` with the three bots if you copied them). - -![Example](/assets/tutorials_interbot-example.png) - -## Structure - -![Diagram](/assets/tutorials_interbot-diagram.png) - -## Step 1 – Creating the bots - -The first thing you need to do is create three bots: one "master" bot (the one that will delegate questions to other bots), and two "slave" bots (the ones who get asked questions by the master). - -Head to the admin interface and create three bots names `master`, `sub1` and `sub2` respectively, all based on the "empty bot" template. - -- Leave `master` bot empty for now. -- In the `sub1` bot, create some QnA entries that are related to the same domain (pick the default `global` category/context). -- In the `sub2` bot, do the same thing for another domain. - -For example, `sub1` could answer questions about Human Resources, while `sub2` could answer questions related to IT Operations. - -At this point, you should have three bots. Master doesn't do anything, while sub1 and sub2 can answer questions about HR and IT Operations respectively when you talk to them individually. - -## Step 2 – Delegation Action (master bot) - -Now let's see how you can make the Master bot ask the questions to the slave bots. To do this, we are going to create an action called `delegate_to_bots` inside the `master` bot. - -The action you need to create [can be found here](https://github.com/botpress/botpress/tree/master/examples/interbot/bots/master/actions/delegate_to_bots.js). Just copy and paste this file in your `/bots/master/actions` directory. - -Next, you will need to create a flow that make use of that action. For the sake of simplicity of this tutorial, all the `master` bot will be able to do is delegate anything you tell him to the slave bots. Of course you could call the action at any time and even adapt the `delegate_to_bots` action to pass in more contexts etc. - -In the `main.flow.json` flow of your master bot, recreate the structure below. - -![Flow](/assets/tutorials_interbot-flow.png) - -The content of the text element is the following: - -``` -The bot {{temp.delegation.0.botId}} can help you with that question. - -[Talk to {{temp.delegation.0.botId}}]({{{temp.delegation.0.botUrl}}}) - -By the way, {{temp.delegation.0.botId}} is telling you: -> {{{temp.delegation.0.answer}}} -``` - -:::tip -The reason we use triple mustaches (`{{{ ... }}}`) is to prevent Botpress from escaping the special characters found in the variables. -::: - -## Conclusion - -That's it! You now have the basic structure in place to allow inter-bot collaboration. diff --git a/docs/building-chatbots/flow-editor/actions/actions.md b/docs/building-chatbots/flow-editor/actions/actions.md deleted file mode 100644 index eca45b2..0000000 --- a/docs/building-chatbots/flow-editor/actions/actions.md +++ /dev/null @@ -1,711 +0,0 @@ ---- -id: actions -title: Actions ---- - --------------------- - -Actions are server-side functions executed by the chatbot as part of a conversational flow. Actions have the power to: - -- Alter the state of the conversation; -- Send customized messages to the conversation; -- Execute arbitrary code like calling an API or storing data in the database. - -Since they are JavaScript functions, they can do pretty much anything and have the following properties: - -- `user`: all user attributes. -- `session`: variables kept only for the session. -- `temp`: variables kept only for the flow. -- `bot`: object containing global variables for this bot (same for all users). -- `event`: original (latest) event received from the user. -- `args`: arguments passed to this action from the **Flow** editor. -- `process`: sandboxed VM containing some of the env-variables (starting with `EXPOSED_`). - -**Example:** - -```js -/** const virtual_machine = async function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { */ -user['firstname'] = 'Bob' -user['age'] = 17 - -temp = { - text: 'hello there' -} - -session.store = [{ id: 1, id: 2, id: 3 }] -/** } */ -``` - -## Registering New Actions - -There is two ways to register new actions: - -- You can add your JavaScript code in a `.js` file and put it in the folder `data/global/actions`. -:::note -There is no way to add new ones during runtime programmatically. -::: - -- You can also write actions directly in the Conversation Studio GUI by navigating to the code editor and using an **Action Template**. - -We use JavaDoc comments to display meaningful information (such as name, description, arguments, default values) on the dialog flow editor. It is possible to keep an action hidden in the flow editor by adding the flag `@hidden true` in the JavaDoc. - -## External Libraries - - - -Code in actions should be kept relatively simple. You can set counters, format data, fetch data from an api using the included axios library. -If you need to use npm modules / libraries or libraries from other programming languages, we recommend you either set up a server for that purpose, or use serverless functions and then call the api using Botpress Actions. Using Botpress for heavy javascript computation use cases like image / video processing may cause latency issues for your bot. - -## Disabling Actions - -Botpress will ignore files starting with a dot (`.`). This way, you can disable a hook or Action by merely prefixing the file's name with a dot. - -## Built-In Actions - -### Wait Action - -- **Action Title:** Wait/Delay -- **Category:** Utility -- **Author:** Botpress, Inc. -- **Parameters:** `data_type:number name:delay` (default = 1000) - The number of milliseconds to wait - -**Example:** -``` -const wait = async delay => { - return new Promise(resolve => setTimeout(() => resolve(), delay)) -} - -return wait(args.delay || 1000) -``` - -:::note -As you can see, the action is just a simple asynchronous arrow function that takes the number of milliseconds to `delay` as a parameter. When building an action, you should specify the action type, its category, the author, and its parameters. -::: - -### Append Context - -- **Action Title:** Append Context -- **Category:** NLU -- **Author:** Botpress, Inc. -- **1st Parameter:** `data_type:string name:contexts` - Comma-separated list of contexts -- **2nd Parameter:** `data_type:string name:[ttl=1]` - Time-To-Live of the context in number of dialog turns. Put `0` to disable expiry. - -This action adds context(s) to the list of contexts used by the NLU Engine for subsequent messages for that chat session. - -:::note Notes -- If a context were already present in the list, the higher TTL would win. -- To override a specific context, use the `removeContext` action before this action. -::: - -This method is contextual to the current user chat session. You can specify more than one context by separating them with a comma. - -### Remove Context - -- **Action Title:** Remove Context -- **Category:** NLU -- **Author:** Botpress, Inc. -- **Parameter:** `data_type:string name:contexts` - Comma-separated list of contexts - -Use this action to remove the provided context(s) from the list of contexts used by the NLU Engine for the subsequent messages for that chat session. - -This method is contextual to the current user chat session. You can specify more than one context by separating them with a comma. - -### Reset Context - -- **Action Title:** Reset Context -- **Category:** NLU -- **Author:** Botpress, Inc. -- **Parameter:** none - - It resets the NLU context to the default scope. - - This method is contextual to the current user and current chat session. - -### Send Feedback - -- **Action Title:** Send Feedback -- **Category:** NDU66 -- **Author:** Botpress, Inc. -- **Parameter:** `data_type:number name:value` - The feedback value. Use `1` for positive feedback, `-1` for negative feedback - -Provides feedback (`1` for positive or `-1` for negative feedback) at the end of a goal (a workflow that the user has completed). - -### Get Global Variable - -- **Action Title:** Get global variable -- **Category:** Storage -- **Author:** Botpress, Inc. -- **1st Parameter:** `data_type:string name:name` - The name of the variable -- **2nd Parameter:** `data_type:string name:output` - The state variable to ouput to - -This action retrieves a variable that was stored globally using a storage key. Botpress uses a `key: value` storage system to allow complex object storage definitions. - -### Reset Global Variable - -- **Action Title:** Reset Global Variable -- **Category:** Storage -- **Author:** Botpress, Inc. -- **Parameter:** `data_type:string name:name` - The name of the variable to be reset - -Use this action to reset a variable with global scope. - -### Set Global Variable - -- **Action Title:** Set global variable -- **Category:** Storage -- **Author:** Botpress, Inc. -- **1st Parameter:** `data_type:string name:name` - The name of the variable -- **2nd Parameter:** `data_type:any name:value` - Set the value of the variable -- **3rd Parameter:** `data_type:string name:[expiry=never]` - Set the expiry of the data, can be `never` or a short string like `6 hours` -- **4th Parameter:** `data_type:string name:output` - The state variable to output to. - -This action allows you to set a variable globally, with optional expiry. - -### Set Variable - -- **Action Title:** Set Variable -- **Category:** Storage -- **Author:** Botpress, Inc. -- **1st Parameter:** `data_type:string name:type` - Pick between: user, session, temp, bot -- **2nd Parameter:**` data_type:string name:name` - The name of the variable -- **3rd Parameter:** `data_type:any name:value` - Set the value of the variable. Type `null` or leave empty to erase it. - -You can use this Action to store data to desired storage based on the time to live expectation. - -### Reset Session - -- **Action Title:** Reset Session -- **Category:** Storage -- **Author:** Botpress, Inc. -- **Parameter:** none - -This action resets the user session and clears information stored in `temp` and `session` storage for the user. This action doesn't remove NLU Contexts and Last Messages history. - -### Switch Language - -- **Action Title:** Switch Language -- **Category:** Language -- **Author:** Botpress, Inc. -- **Parameter:** `data_type:string name:lang` - The language code, e.g. `en` - -Valid for Enterprise License holders with multilingual bots, this action lets you change the bot's language for the current user. - -Botpress comes pre-packed with a translation engine that helps developers design a bot in one language while catering to users of all supported and configured languages. - -## Content Types - -Content types are the primary way to display content in the chat. - -### Audio - -The audio component can stream `MP3` audio (`.mp3`). You could use it to stream music from Spotify or YouTube. This component could also stream audio files stored on your server. - -![Music image](/assets/music.jpg) - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create a video content type in action. - * ``` - * { - * type: 'audio', - * video: 'https://URL_TO_YOUR_VIDEO.mp3', - * title: 'Random_video', - * typing: true - * } - * ``` - * @title Display audio in the action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const audio = await bp.cms.renderElement( - 'builtin_audio', - { - type: 'audio', - title: 'Ort Cloud', - audio: 'https://ia801901.us.archive.org/13/items/Home-Odyssey/Home-Odyssey-04OortCloud.mp3', - typing: true - }, - event - ) - - await bp.events.replyToEvent(event, audio) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Card - -A card is a single element of a carousel. It can be view as one card in a deck of cards. The carousel is the whole deck of card. - -![Card image](/assets/card.jpg) - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create an Card content type in action. - *``` - * { - * type: 'card', - * title: 'Botpress', - * subtitle: 'Website', - * image: 'https://avatars.githubusercontent.com/u/23510677?s=200&v=4', - * actions: [{ title: 'Botpress website Documentation', action: 'Open URL', url: 'https://botpress.com/docs' }] - * } - * ``` - * @title Display an Card in the action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const audio = await bp.cms.renderElement( - 'builtin_card', - { - type: 'card', - title: 'Botpress', - subtitle: 'Website', - image: 'https://avatars.githubusercontent.com/u/23510677?s=200&v=4', - actions: [{ title: 'Botpress website Documentation', action: 'Open URL', url: 'https://botpress.com/docs' }] - }, - event - ) - - await bp.events.replyToEvent(event, audio) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Carousel - -A carousel is a series of cards. This component is useful in e-commerce chatbot. The image element can be a URL or a [Data URLs](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs). - -![Carousel Image](/assets/carousel.jpg) - -**Example:** -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create a Carousel content type in action. - * ``` - * { - * type: 'carousel', - * items: [ - * { - * title: 'Botpress', - * subtitle: 'Website', - * image: 'https://avatars.githubusercontent.com/u/23510677?s=200&v=4', - * actions: [{ title: 'Botpress website', action: 'Open URL', url: 'https://botpress.com' }] - * } - * ], - * typing: true - * }, - * ``` - * @title Display a carousel in the action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const carousel = await bp.cms.renderElement( - 'builtin_carousel', - { - type: 'carousel', - items: [ - { - title: 'Botpress', - subtitle: 'Website', - image: 'https://avatars.githubusercontent.com/u/23510677?s=200&v=4', - actions: [{ title: 'Botpress website', action: 'Open URL', url: 'https://botpress.com' }] - }, - { - title: 'Botpress Documentation', - subtitle: 'Website', - image: - 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAoHCBYVFRgWFRYZGBgaGBgYHBoYGhgaGBoYGhgZGRgaGhocIS4lHB4rIRgYJjgmKy8xNTU1GiQ7QDs0Py40NTEBDAwMEA8QHhISHjQrJCs0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NP/AABEIAOEA4QMBIgACEQEDEQH/xAAcAAABBQEBAQAAAAAAAAAAAAAEAAECAwUGBwj/xAA9EAACAQIDBQUGBAMIAwAAAAABAgADEQQSIQUxQVFhBnGBkaETIrHB4fAyQlLRB2JyFCMzgqKywvEWktL/xAAYAQADAQEAAAAAAAAAAAAAAAAAAQMCBP/EACMRAQEAAgICAgMAAwAAAAAAAAABAhEhMQMSE1EiMkEUYXH/2gAMAwEAAhEDEQA/APHspjhDCFsRbiJIJFsw3szG9kYQ0twNDO6rvudwgAT0SNT98pXaevbN7OUvZ5KqhgRxGtjrbprrpuMxdqfw7Ni+GfNxFN9G7g27nvj0TzwLJFYXjcC9FylRWRhwYW8RzEHvEam8sWRcRLAkhHMaO0DRvFnkGEQECTzxiLxhLFEDJFtHj2kWgEs5kTHB0iAgCAjLExk1WK1rGHUSd42WOFmVYRaK8REQERnF44JiERgCv0EUXjFAI0lGpki8jhkud8lUpkGUc6JM6HsXgw+IBO5AW8t3qZzhpkTtP4ep71UkahFHmT+0Dk5de1Ygw7D4q9gd/P6zIxmhhGGcEcb890Uy1VrhwL2tsuli09nWGovkdfxoeY+Ynk3aTs7VwdQo/vIRdHA91l+RHET2HDHQceu+Tx2CTEI1GqLowOU8UbgQeBF5vtG4vn8xAzY2/sV8NWak+8aq25XU7j0+kyGW0yRXiJjBYxgDxwsZZYg1AgDKkmqySrrHaAVkyJkmjQB8ug8fjHOktyaL/T/yaF7G2PUxVQJTUnm35VHMwOM6nTLGwBJPAamdtsL+H+IrAO9qaEX978Xlwnfdl+x1HCqGID1OLsN3RRwE6VoSfZ+2unm20+waUKLPnzFQSSdB9J5u7C89t7dYkLga1/zZUHeWH1niLi8zlJtTG3Rs0V4gJBhEdqV495ALJeECPmijWigEKOhluJolbG++Dkwj2l1m0VGY851n8PsQRXdSdGQ+akEfOcmbTa7JV8uJp9Tl8wRBrHt6NjwLXktm1eFx6X+EsrJdTxgGGQZtfgT8JmzVdPFx06OmQfz38dPhClp3Ghv8RM7Dqo3WH+X5mG079/cD8iRKOfpm9qez642lbdVS5RuJB3qeht5ieOYnCMrFHFnU5ddDf9J68p7z7bIQeHPXTvBnNds+ygxNq1Gwf862/GAD67vSK8s5TXLyEJIshh+P2dUQnOpVhYODvBIuCe/nz77AQ03NtDy8RESm2skm+PlIzXG4hfHU/wDEyKmAXtoYxkmW9rXkmomwNtDuhRA5klWT9mZs7B2BUxLqiKQCdWI0AG8wCvZ+x6mJdKdJbnKuY8FB1uT43ntHZns/TwlMIguTq7nezft0hOxNiU8MgVFF7DM3FiAAPQCaRjkMxMFxNWwltWpaZ1a5YR08cd1xv8S9oAUadLi7FyOOVRYep9J5mWm32r2j/aMS7g3UHInRV0HnqfGYhWRt3VpNQ149orRrRGVoiIjEYyNliiijAcmEYapwMrySBQzbnW1qVjJYOtkdG/Syt5G8gKpuLx6ycRA49lSquUHgwuDzvrMfEtkY2G/lvjbGxAfDU7n3ggB7wJLDt73vAnlz8+UzldurGcbamy0dhcJbq1z9JrurAauSemgHlvgOCqZrDNa2oVNdOtt3iZbXqsDwudBc6k8rTU4iGXOSDO5vma6/zCxHcRqYXgKjfhve3w6ekHwtYkhalwTfKeB/l7xCmUUyCNx+B+V/jFPs7eNL8Ts2nWUiogJ0Um2pGkzqfYvD5bW/Mp8mv9980zXuL8NfTdDcPU0++IvN7Rscvj+wmHcDQiwN7cS3E9dTB27A4awGU773+U7SrU0t3SaIMtvvjAnFnsDQ1AvYMCOfUd0JqdiqLUSijLZswbiNJ1+Xie6PT4gjpAOQfsHQYLp9nh98p1WztlpRRURQAAB1MPC2tLssNDYJxBqjQ+ol4O1K8bUoBlPUffSc72vx7UMNUcH3m9xLcC28+V50uIUDQad88q/iZtAvWWip92mvvaixdwCb68BbzmMrqKxw7m8bJIlTGk9NbiWSK8bMYs0ehtLWNGDyaG5AiM2UxQ72UUC5Z2YReMq9nGyGUS9avo79ZbWXXQwRLgyTsx1tFSjsdjZ8qZGt7ovynQh6IGZ3Yniijf3kzl+zGKIAB5FfmJq4mjrcGQ3qu7Ge0n/Gum2GQ2SmqodQApJPW99fKaeBxauSr6g6jnbp3fd5hbPqALlZbrxXXQ/qU8Id7Nbggkjfcfivz7/iJvHJDPGNt3IGW+Yb1Pd1+/WMa2Ya8fQ6GDUBcHUc/HmPvjHLi5F7G9xz1E3ck9D0Nlsevwv84VgKvvd/38pmhydfqPCHYPgw38oS8s2cDcTrYg6iXU3yWHDf5zPxblTfgbfGaKJmS3EDT4zX9Z1wPdbqe6Rw+sfB6pIYM2JB5zTOhLcuMuQ6QVXu56S8vGE2SVsksV47C4gGfXNuFxPCe2So2IqMje9nYOpBvmB1Nzpae8BLk3nnu1Ox+HLvUr1cudmbKDrqbyPky1F8JNvJssYpPSU2Ns5TlRKtVuQLH4TYw3ZxXtkwCKOdR9fIXkvk+lLPt49kjimZ7eOytID36dBOii58zBauxqSf4OHVzzOg9Yr5bP4WMleMlJfhaVzPVqmwWc3elQUcuPpJL2ToDUhF/pJmfn/0dxjzv2Bino3/AIzh/wBY/wDYxofLC08ZZrRxEJK86C7NaIORJAx1i2frK1+z9Q5906LEnlOc2E1nI5idXQwwbUyGd5Xw/GHwCE7jp6ia9IZdGHceB7wZRQwgG6XEAaX8Lm0JdJ5c1eiG91K25X+HGG06WYe9Y/f3wgOGpAnUKems10REXMbLbebWErhLUsrosPhtTr53Hx3w2hRINrHp/wBzmdodraFI6Bz1Gg9dD5Rtn9vKDsA10F953eI+YlpjpK7rpMSL6H70hWBqZVseI+BgtWujgMhBB3EHf++sglTW3W3qdI/6JzG/hH8iTJZcrHrrMrCYj3zbcLDx4/AzTNUGx42v9+cZWaWgcect4RLYy4LGyovaSV5kbV2/SpPkuHf9AIuO+/GU4Hbuc2KFDyPHxGkx8mPt675amNs3G7WU5TlGtt04za2DphvaYlrkflUWUDrznX0at4PtfZiVkOZQfvjF5PHMoeOVxri07TYdBaiEHTQHzMqxHaPEke5TTxcn0Aibs8gf8K+W4QldmqDos5fjq/viyDtXHNuCL/lYwujXxJQhiC99CAQo8CZs0cKBCBQmp4ds3yMBaGJP4nQeEi6VlH4wfC86EUpL+zx/48Hy1ynta3P/AExTqv7N3R4f42I+WvnqPFaOFvKnIYXkh3SQS0QEztuRt9nUuxM6+ibTnOz2HsCec3y0587+Sk6adDFcCJp06QYDge6c7SfWdFgHBA+V/mJTx3faOc10m9AojMgAsL3sJzqYoslXE1zmWmCqL+XMBcm3MaeJndIgdLHlOJ2hs9jhsTh/zK5qL1RwBfzWx7514Y8xDLL8a8x2htB6zl3O/cOAEqwyMScoJsLmwJsBvJtuA5yiopBKkWINiDvmx2Z2i2HqNURFdijoA+qWcAMWXewtf3bi99Ta4L5t5Y6jY7O7YeiQMxyE7uTfZM9FqYi6Z1P5l3dQB5zyQ6KPOeh9n6uahbfofA2A+UllxdLTnHdbezsVezcbi467v3nRYUXAPGw9R9+c4nBPZlUb9fG+gHpedtgX90Adw8JrG7hZzTUoiZfbHapw2Eq1E/GEITobb/DfNSgJidtcOKlHKRdWDqe5lsYeTL1xtS7r51ao7vfMWdm36lixOmo1JvynrHZfE1lR6WJQrWonKwa17ZQym4Njod4M84bZdbDYhP7ssUdWQhWKuVYFd27hcXE75MXVVC1d8+IrEX3aDcAANygafvvkfLljcZZ3/G/HLbJHomz8RmC9QDNdN1pgbJoFVQHgonQINJfHpnLW2BiaIBPWQFDTSHVk96VsvKGhsKKNpMUoWqaSNRYaG1KII5p9JJKcuFOMg9ooRligHzJmk1PWWFRIMgkNu3VhFo9M3MqKESzDb9YaLddlssAILQ8QHZ34BDQOs5b2osWoeQmpgcTwuLcjMpNN2p6y1Ad/1/ebxuqxlJXbYGuLDS/WWY7ACpZgQrrex33B3qw4qZz2zsVoNw8/W950mGxIIE68MtubPHTz3tH2bBbM1Eg/qUFh5r87TmKuHWn7qKb9xE91Dhpl7QwKN+UX6ASuWdsTxkl5eLthHPvMCANd3l4TsOzmIyob6Dd36TQ2hhVX3dNdTyt+wmW623fqnJllZXXNXHUaWzTnq6aWv6mdng3sVtwPpOMwN0N+On1E6rAV7JmO/wC7TfjvCXkdKjwbbGGNRAFNiDf5aiQw9TMLw5TpK5YzKaqO9XbhNo7AxLN7i0x/Nmb/AG5fnCNidlhTf2lV/aVOHIfsJ2bJeKnSA4SePhxx6b+S60rwtC2sNC6RlEnwlmGTXU3jpT0lj2vJERBQ0SrLWEjAKzFaTAiYxhDLGj3jRB80iStIAyStOau6U5kqW+QvJp9/ZjFdXs1rqJqIkx9jkFd820USFnJ2pJSHE+Edk8POWIOvxiPh8PjHIxssOxB7vvnNrCYknjMIhuRPd9I9PFlTvset/wB5vHL1Zyx27OjWEtrV+F+G+cvS2kdLnxGnpvMLfFZh7p8ZeZSoXC7Qx9nNgNdw+sx8RTs633fLcd00kcA6wPHrcFj3D4SWfPK2HHATC4n3yTu5GdPhKmYAdJxWex6+u/fOk2JVu1/CGGXLeeHG3Z4E2AvNKk15jUauk0MPVnTHLca0bSQWSUSOfWNlJRJOdIwYSFRoBnOdZYDeKovSQQzATjR4jNBBhGkmleaAPaPIRQD5lCkbjHU8xJiOZz7dsxQzDhGvJFLxhT6/tDgWVubBqe9a86+jTJnAbPq2cd/H9p6Bs97gXPhbWYyx5K3heKcZkHXy+sMWmPvfHal084/Vj2ZrKvXyH7yJYDe7jpvPleHvhe4ekGego/MPBSfjaZs0e0aaIfzN5AfAGaKKUAAUsDvN1BHpAqVNLa5r8CbKPS8OCsLBWFuPGUxZtUVFa592yjjvMCaqXIFtN3LpNNEcneMvW/pbjE9FnJIUAAWGlr/SO47KZaZ+P7Ou9npkZl1seIPAxYLFrQstYlG5ZWIHiBOk2ZdBlbf98oTtbZiYhDoMw1BtrHfHxudt4ebV9cuvs+GcMoZTcEXBG4jpNPDi5AmHgKWRUTlwnUYClpfnrN4bvbPm1Oh67hIKsk8YLKuVZeRMa0eZaDuspIhVSUusWggpiMaMzRgzysGJmkLwCy8aRvFAPmoGLNKVqc5YrAyFjtmUWLJZL/TQDxjfD1MdVLEAfSI+x2zaFjmJ0Gtl0F+p4zrNk4wFQTpfdxmBXTIgVeOmY84URkyAndbU779B+8j7buzyxmtO2w7X595/aGBNJmbPqBkBDX675qUk+906MXNlwiaHjKzh/CHIuktFK816s+zIOFAN7XPWM9BTvGnIaTXFMG8i2GBOsPUezPprrfUaWG/7tLKNNh+Y3vvI3DoJc+GN7qfsStVcEkk39I4N7aFNN2mnzhaEgDXwgGHBO8kzSw9HXWUjCqlTJctbkPCbOHMalTEJQQ6LLLaareSsBGjM8QOTEJDNJKYA7wVxCWMGqwoVFpBmjO0rYxAmkC0ZntKzUHDygFuaKD+2ihsPm/LfcYgvP/uOU8IspmNuiwlJ33m9srD3sxHC4HU7vGYGa5AtOz2TRu6jhdQO4SHnuor4ZzUcXQvXpIRvINuFpHa1850JtoABrNfadJVx6C/5VPiby3DUA9RxxLN8TOb21pXtTsPElFA0+Q+s67DXZQSd/D5mcdgaBVNdAGI+k3MFXK2B75fxZ/aHlx+my6m/SE+0923SCU61yPOW1n0+M6ZXPYrFU/h5ybVePSDKNbmSvfoIew0Mpsd5hK674DSa3WGUiY5WaLoUxwEOpwWgtoXSE0zRNOXKJWglsZJSMUjAHk1kFEsEYM5gtUwioYFWaKtB6hlXtI9R4Iz2Mxaa2o/hB3frE9SDM5HK3OFp6W+06jyEaU+16j78IpncGng9omPARs0jE6bVtBLso5kTudiJ/er3zjtk081RehvO22Itq4H83ynL57zIrhPxtUbba2OJPAoP9IPzh2wn/vjfizfG/wA5j9ra2XGkD9SH/Ss1dltlrD+r42ks501jd41sbQwgRD1c+tzA8OTeavaNrInVifIfWY9FpXCaxRt21aT2N+OkvercATJR9YQryky1wncRD1eUtw+p1+xBqY4/H5CHYddZvG21miE36TQpU4PSXlDqR4S8iVq+isMprB04QxBNQliyVxIrHMbJ83KNeRzGTQQCayRitE0AoqNAMQ8MrmZeJeKnIorPBXf6ftGrVIEamu+SyyUkEO3GVu3hK6jcfHT71kHfje8zaek/ER4N7U9PWKZPVeJxSBeK8rpvca2w2s5PKdngTbEgcwjeYtOK2UdT4TtcM16lB/1UrHvR1/8AqcXm/Z0Y/qF7SYUnHMxHuhEI78tpdhX99W6r8IV2vbK4PNBbzN/lMjBVCAgJ1uB6mTy3lyeH6up7UOf7ocLOf9syqTzQ7Sn3aB5q3/GZdMyuPSItGhNIwNHlyPNAeh4maOGb75zNw4G87oejXOkthwlk08MeMNprA8MIcgnREaIoiGU4NShKxsrBFGEQaASEmDKg8kHgFl5FmkS8gzxhTiGmTiXmlWaZONaYyajLr1LGC5tY2KfmRKUa857VpBDvaRZhaRzC0rZze3I+nWKgsnQRRXHOKDTxcxCKKdCbT2Xv8Z3GF3Yf+mr/AL0jRTh8/brx6S7bfip/0fMzDwf5f6hFFJ/xrH9XW9o/8PD9zfBZl04opTHpBaJYkUU0bSwvDumjhuPfFFK49pZNjD/KFpFFOqIiqcJpxRRsnkRFFAHG+SMUUQRaQMUUYgerMrGcYopjJqOZ2hvg+G3x4pzXt0Tpe27zjNv/AMv7x4oUqDiiimTf/9k=', - actions: [{ title: 'Botpress website', action: 'Open URL', url: 'https://botpress.com' }] - } - ], - typing: true - }, - event - ) - - await bp.events.replyToEvent(event, carousel) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Dropdown - -A dropdown displays a list of choices. - -![Dropdown image](/assets/dropdown.jpg) - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create a dropdown content type in action. - *``` - * { - * type: 'dropdown', - * message: 'Dropdown Content type', - * buttonText: 'Click me', - * placeholderText: 'dropdown placeholder', - * options: [{ label: 'Food', value: 'apple' }], - * width: 10, - * displayInKeyboard: false, - * allowCreation: false, - * allowMultiple: false, - * markdown: true, - * typing: true - * } - * ``` - * @title Display a dropdown in an action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const dropdown = await bp.cms.renderElement( - 'dropdown', - { - type: 'dropdown', - message: 'Dropdown Content type', - buttonText: 'Click me', - placeholderText: 'dropdown placeholder', - options: [{ label: 'Food', value: 'apple' }], - markdown: true, - typing: true - }, - event - ) - - await bp.events.replyToEvent(event, dropdown) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Image - -You can display images. You can use a URL image or a [data URL](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs). - -![Image of the content type image](/assets/image.jpg) - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create an image content type in action. - * ``` - * { - * type: 'image', - * title: 'Random image', - * image: 'URL_YOUR_IMAGE', - * typing: true - * } - * ``` - * @title Display image in action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const image = await bp.cms.renderElement( - 'builtin_image', - { - type: 'image', - image: - 'https://upload.wikimedia.org/wikipedia/commons/thumb/d/d3/Sphalerite_-_Creede%2C_Mineral_County%2C_Colorado%2C_USA.jpg/1920px-Sphalerite_-_Creede%2C_Mineral_County%2C_Colorado%2C_USA.jpg', - typing: true - }, - event - ) - - await bp.events.replyToEvent(event, image) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Location - -It displays a place on a map. Location is only enabled in the Vonage channel. - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create an location content type in an action. - * ``` - * { - type: 'location', - latitude: '', - longitude: '', - address: '', - title: 'Botpress Office', - typing: true - * } - * ``` - * @title Display an location in the action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const audio = await bp.cms.renderElement( - 'builtin_location', - { - type: 'location', - latitude: 46.784541, - longitude: -71.2909357, - address: '2480 Ch Ste-Foy Bureau 175, Quebec City, Quebec G1V 1T6', - title: 'Botpress Office', - typing: true - }, - event - ) - await bp.events.replyToEvent(event, audio) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### File - -Botpress can display PDF file. Currently, we are only supporting PDF. - -![Image of file](/assets/file.jpg) - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create an File content type in action. - * ``` - * { - * type: 'file', - * file: - * 'http://wavelets.ens.fr/BOYCOTT_ELSEVIER/DECLARATIONS/DECLARATIONS/2008_07_01_Aaron_Swartz_Open_Access_Manifesto.pdf', - * title: 'Aaron Swartz Guerilla Manifesto', - * typing: true - * } - * ``` - * @title Display a file in the action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const file = await bp.cms.renderElement( - 'builtin_file', - { - type: 'file', - file: - 'http://wavelets.ens.fr/BOYCOTT_ELSEVIER/DECLARATIONS/DECLARATIONS/2008_07_01_Aaron_Swartz_Open_Access_Manifesto.pdf', - title: 'Aaron Swartz Guerilla Manifesto', - typing: true - }, - event - ) - - await bp.events.replyToEvent(event, file) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Single choice - -This component carries a message, usually a question, and suggests choices to the user to fulfill the message. The user can only pick one option, and on selecting the preference, you can instruct your chatbot to get a custom value. - -![single-choice image](/assets/single-choice.jpg) - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create a Single-choice content type in action. - * ``` - * { - * type: 'single-choice', - * text: 'Ort Cloud', - * isDropdown: 'https://ia801901.us.archive.org/13/items/Home-Odyssey/Home-Odyssey-04OortCloud.mp3', - * dropdownPlaceholder: true, - * choices: [{ title: 'title', value: 'value' }], - * markdown: true, - * disableFreeText: true, - * typing: true - * }, - * ``` - * @title Display a single-choice in the action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const single_choice = await bp.cms.renderElement( - 'builtin_single-choice', - { - type: 'single-choice', - text: 'Place to eat', - isDropdown: true, - dropdownPlaceholder: true, - choices: [ - { title: 'Burger Place', value: 'Burger' }, - { title: 'Salad Place', value: 'salad' } - ], - markdown: true, - disableFreeText: true, - typing: true - }, - event - ) - - await bp.events.replyToEvent(event, single_choice) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Text - -The text content type is a regular text message with optional typing indicators and alternates. You can use markdown in your text to add formatting and style, but please ensure that the target channel can render this text. - -You can write HTML in the text content on the web channel, and your chatbot will render it correctly. This opens up the possibility of including iFrames and constructing miniature web pages (commonly known as web views) in your content without creating custom components. - -![image text](/assets/text.jpg) - - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create a text content type in a action. - * ``` - * { - * type: 'text', - * text: 'hello World !', - * variations: ['Greeting', 'Bonjour tout le monde'], - * markdown: true, - * typing: true - * } - * ``` - * @title Hello World with a Built-in text - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const text = await bp.cms.renderElement( - 'builtin_text', - { type: 'text', text: 'Hello World!', typing: true, markdown: true }, - event - ) - - await bp.events.replyToEvent(event, text) - } - - return myAction() - - /** Your code ends here */ -} -``` - -### Video - -You can either upload a video or link to a video file that will be fetched when the content element is invoked. - -![image text](/assets/video.jpg) - -**Example:** - -``` -function action(bp: typeof sdk, event: sdk.IO.IncomingEvent, args: any, { user, temp, session } = event.state) { - /** Your code starts below */ - - /** - * Show how to create a video content type in a action. - * ``` - * { - * type: 'video', - * video: 'https://URL_TO_YOUR_VIDEO.mp4', - * title: 'Random_video', - * typing: true - * } - * ``` - * @title Display an video in the action - * @category Content type - * @author Botpress - */ - const myAction = async () => { - const video = await bp.cms.renderElement( - 'builtin_video', - { - type: 'video', - title : 'Lady Gaga', - video: 'https://ia601201.us.archive.org/4/items/Lady_GaGa_Poker_Face_/Lady%20GaGa_Poker%20Face%20.mp4', - typing: true - }, - event - ) - - await bp.events.replyToEvent(event, video) - } - - return myAction() - - /** Your code ends here */ -} -``` diff --git a/docs/building-chatbots/flow-editor/actions/built-in-actions.md b/docs/building-chatbots/flow-editor/actions/built-in-actions.md deleted file mode 100644 index 70150e3..0000000 --- a/docs/building-chatbots/flow-editor/actions/built-in-actions.md +++ /dev/null @@ -1,135 +0,0 @@ ---- -id: built-in-actions -title: Built-in Actions (All of Them) ---- - --------------------- - -## Built-in Skills - -Botpress comes preloaded with some rudimentary skills. Let us look at these; we are confident that you will use them when building your next chatbot! - -### Choice Skill -This skill is a spin-off from the realization that most chatbot conversations will eventually have a question with hardcoded choices as answers. Although a content element lets the user select buttons to pick a response, the choice skill adds a few more caveats to that content element, which we will explore here. - -![Single Choice Content Element](/assets/single-choice.png) - -In addition to just letting you click a button and you are on your way, the choice skill adds a few checks and transitions to the process. - -First of all, where freely typed responses are not disabled, the choice skill allows you to add answers which the user might type directly. In this way, the chatbot can understand and classify other responses besides the button click, adding a good measure of flexibility. - -![Choice Skill Overview](/assets/choice-skill-entry.png) - -The choice skill also allows you to let the user have another go at answering the question asked. In instances where the user might fail to perceive that a button response is required, the chatbot prompts the user to choose from the supplied choices. It is also crucial in cases where the chatbot developer does not pre-empt the freely typed responses. - -If the chatbot doesn't understand a user's answer, it will react by guiding the user on how to respond to the question before asking the question again. - -![Choice Skill Advanced](/assets/choice-skill-tries.png) - -The choice skill also offers an option to transition to a different node when the user repeatedly fails to answer a question. - -![Choice Skill Flow GUI](/assets/choice-skill-transitions.png) - -### Email Skill - -The email skill provides a quick way to send emails from within a Botpress workflow. - -#### Configuring Email Skill -To send an email using the email skill, you need to configure your chatbot with a transport connection string. Set the configuration string in the directory `...data/global/config/basic-skills.json`. For more information on the mail transporters available and how to configure them, please visit the [Nodemailer documentation](https://nodemailer.com/smtp/#examples) - -Here is an example of a configuration using a mail server: - -```json -{ - "$schema": "../../assets/modules/basic-skills/config.schema.json", - "defaultContentElement": "builtin_single-choice", - "defaultContentRenderer": "#builtin_single-choice", - "defaultMaxAttempts": 3, - "disableIntegrityCheck": true, - "matchNumbers": true, - "matchNLU": true, - "transportConnectionString": { - "host": "192.168.100.200", - "port": "25", - "secure": false, - "tls": { - "rejectUnauthorized": false - } - } -} -``` - -:::note -Setting `"rejectUnauthorized": false` will prevent the Botpress server from rebooting every time an email fails to send. We recommend that you put in place a fall-back strategy if this happens using the `on failure` transition. -::: - -#### Creating your skill - -From the Flow Editor view, click on Insert Skill > Send Email. The following interface allows you to insert the information you would fill in using any standard email service. -**From, To, CC & BCC** These fields are filled with email addresses. The _From_ field will be the sender's email address that the recipient will see when receiving an email from your chatbot. You can configure it to any valid email address. -**Subject** This field contains the subject of the email. You will need to create a content element that will load as the subject line. Please note that it will render as plain text even if you use markdown in the subject line. -**Email Content** Again; this field will load from a content element. Unlike the subject field, you can use markdown, which Botpress will render correctly to the receiver. You can also include HTML to enhance the formatting of your email body further. - -It is worthy to note that Botpress supports templating in all fields of your email skill, allowing access to variables stored in [Memory](/building-chatbots/memory-&-data-persistence/flow-memory). All `bot`, `user`, `session`, `temp`, and `event` are accessible via templating. To access these variables, reference the memory location. - -### Other Skills -Two other skills, namely, the `Call API` and the `Slot Skill` are available in Botpress. You can look up these skills and use them in your chatbot. - -In this tutorial, we're going to fetch the list of Botpress repositories on Github and display the description of the first one. We will show you how to call an API, save the response and use the answer in a content element through templating. - -## Action Example - -We will use `axios` as an HTTP client. - -Start by creating a new JavaScript file in `/data/global/actions/callApi.js`. Then copy the following code: - -```javascript -const axios = require('axios') - -/** - * @title Call the Github API to fetch Botpress repositories - * @category Turorial - * @author Botpress, Inc. - **/ -const callApi = async () => { - // We call the Github API - const { data } = await axios.get('https://api.github.com/orgs/botpress/repos') - - // We assign the response to the session variable so we can use it later - session.response = data -} - -// Actions are async, so make sure to return a promise -return callApi() -``` - -:::info -What is the `session` variable? Learn how to [use Memory to store data](/building-chatbots/memory-&-data-persistence/flow-memory). -::: - - -### Using the Action - -Add an `onEnter` action instruction in your node and select the `callApi` action from the list: - -![Action](/assets/tutorial-call-api-action.png) - -:::info -What are `onEnter` instructions? Understand how the [node Lifecycle](/building-chatbots/testing-&-debugging/emulator) works. -::: - -### Add a Text Content Element - -Create another `onEnter` instruction to make your bot say something. Once the first instruction executes, the response is stored in the session variable. - -Here we use templating to get the description of the first repository from the list: - -![Content](/assets/tutorial-call-api-element.png) - -:::info -What is templating? Take a look at the [Mustache demo](https://mustache.github.io#demo) to understand how templating works in Botpress. -::: - -Once everything is completed, this is what your node should look like: - -![Node Properties](/assets/tutorial-call-api-node-properties.png) \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/content-elements/content-card.md b/docs/building-chatbots/flow-editor/content-elements/content-card.md deleted file mode 100644 index dc73891..0000000 --- a/docs/building-chatbots/flow-editor/content-elements/content-card.md +++ /dev/null @@ -1,96 +0,0 @@ ---- -id: content-card -title: Content - Card ---- - --------------------- - -A card is a message with a title and an optional subtitle that contains an image and action buttons. - -![Card Example](/assets/card-example.png) - -## Add a Card in a Node - -1. In the Flow Editor, click the node where you want to add your card. -1. Choose where to put your card: **On Enter**, **On Receive**, or **Transitions**. -1. Click the **+** button. -1. Under **Message**, click the box. - 1. In the **Pick Content** dialog, under **Search In**, select **Card**. - 1. You can either: - - Select an existing card in the list. - :::info - This will bring you directly to step 5. - ::: - - Click the **Create new Card** button. - 1. A new window will be displayed where you can modify the following options: - - The **[Title](#title)** box. - - The **[Subtitle](#subtitle)** box. - - The **[Image](#image)** button. - 1. Click **Submit**. -1. Click **Add Action (Alt+Enter)**. - -### Options - -When adding a **Card** content, you can modify some options: - -:::tip -When hovering a box where you can type, the `` symbol appears. This button helps you easily insert variables within your message. When you click it, it shows a list of variables that you can use such as `temp.`, `user.`, `session.`, or `event.`. -::: - -#### Title - -This is the most important information regarding your card. It will be displayed in bold and just under the selected image. - -:::tip Best Practice -Your title should be short, precise, and relevant. -::: - -#### Subtitle - -The subtitle gives extra information (that couldn't be in the title) about the card. - -:::tip -The subtitle should be a complement for the title. It should add relevant information for the user. -::: - -#### Image - -There are two ways to add an image: - -- Under **Image**, click the square with an up arrow. Then, you can choose which image you want to add there from your storage. -- Under **Image**, click the **Or enter URL** button at the bottom right of the square. A box will appear and you can type the URL of your image. - -:::note -Don't forget to take a look at the list of [supported formats](/building-chatbots/flow-editor/content-elements/content-image#supported-formats). -::: - -## Add an Action Button - -An action button is a button that triggers an action. - -1. When creating your card, there is a **Add Action Button** button that you can click. This will open a new dialog box. - 1. Under **[Title of the button](#title-of-the-button)**, type the name you want to give to your button. - 1. Under **[action](#action)**, you can select either: - - **Say something**; - - **Open URL**; - - **Postback**. - 1. The last box is about entering a text or the ID of a content element that you want to show in the conversation. -1. Click **Submit**. - -### Options - -When adding an action button, you can modify some options: - -#### Title of the button - -This title is what the user will see on the button. They will click the button and it will trigger one of the three possible actions. - -:::tip -Make sure that the title is something relevant to the user. -::: - -#### Action - -- **Say something:** when the user clicks the button, it will answer with a text. -- **Open URL:** when the user clicks the button, they will be redirected to a website, opening a new window in their browser. -- **Postback**: when the user clicks the button, the desired data (typed in the payload box) will be sent back to the server. For example, your button could be titled `Buy` with `idOfMyItem` as a payload. \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/content-elements/content-carousel.md b/docs/building-chatbots/flow-editor/content-elements/content-carousel.md deleted file mode 100644 index 66a69ae..0000000 --- a/docs/building-chatbots/flow-editor/content-elements/content-carousel.md +++ /dev/null @@ -1,65 +0,0 @@ ---- -id: content-carousel -title: Content - Carousel ---- - --------------------- - -A carousel is an array of cards, that can be presented horizontally or vertically. - -The carousel has the Postback feature, which allows you to send custom data to the Botpress server when the user clicks a button in the carousel. Using a hook, you can make your Botpress server act upon the received data. - -## Example - -When our chat user clicks on a button in the carousel, we send a payload with a city code (`mtl` [Montréal] or `nyc` [New York City]). - -Then, we create a hook that saves this city code in the memory. The bot then flows to a particular node, depending on the value in memory. - -As you can see, the bot first displays a carousel, then a different node based on the value of `temp.cityClicked`. The current transitions do not work yet, let's see the hook. - -## Implementing the Hook - -1. Access the Conversation Studio of the selected bot. -2. Click the **Code Editor** tab. -3. Next to the **Hooks** tab, click the **+** button. -4. In the dropdown menu, hover over **Event Hooks**, then click **After Incoming Middleware**. -5. Type the name of your hook. -:::note -Don't forget to add `.js` after the name you typed. -::: -6. Paste the following snippet inside your hook file: -```javascript -function hook(bp: typeof sdk, event: sdk.IO.IncomingEvent) { - /** Your code starts below */ - - async function hook() { - const backs = ['callback', 'postback'] - if (backs.includes(event.type)) { - let payload = '' - switch (event.type) { - case 'callback': // For Facebook Messenger - payload = event.payload.text - break - case 'postback': // For Web - payload = event.payload.payload - } - - switch (payload) { - case 'mtl': - event.state.temp.cityClicked = 'mtl' - break - case 'nyc': - event.state.temp.cityClicked = 'nyc' - break - default: - console.log('Unexpected payload') - } - } - } - - return hook() - - /** Your code ends here */ -} -``` -7. Save by clicking the little disk at the bottom left. \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/content-elements/content-elements.md b/docs/building-chatbots/flow-editor/content-elements/content-elements.md deleted file mode 100644 index a5947ac..0000000 --- a/docs/building-chatbots/flow-editor/content-elements/content-elements.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -id: content-elements -title: Content Elements ---- - --------------------- - -Botpress includes its own **Content Management System** (or **CMS**) to manage a chatbot's content. Everything your chatbot says comes from the CMS. Before we start discussing how you can create and edit the content of your chatbot, you should understand the different concepts of the CMS in Botpress. - -## Content Types - -A **Content Type** defines the structure of what the chatbot sends. It also dictates how your chatbot should render the content. It can be as straightforward or as complex as you want. For instance, a content type could be a simple text or an image, or a carousel. - -:::tip -As a general rule, the more domain-specific the content types are, the easier it is to manage the chatbot for non-technical people. -::: - -Content types are particular to the chatbots to which they are associated. Here are some typical examples: - -- A restaurant `Menu` and `MenuPage` types; -- A `QuestionWithChoices` type; -- An `ImportantBroadcast` type. - -As you can see, content types on Botpress are much more specific than generalized "message types" on traditional chatbot building platforms. - -Developers define content types in JavaScript. Each content type has its own `.js` file, and Botpress automatically finds and registers new content types based on the directory and naming convention of the file. - -## Content Element - -A **Content Element** contains the data of a content type. Multiple Elements can belong to a single content type. For instance, the "text" content type will include an element for every sentence of your Bot. - -**Example:** - -```json -{ - "id": "builtin_text-pSsHWg", - "formData": { - "text": "👋, {{state.$r}}!", - "variations": ["Hello, {{state.$r}}!", "Welcome to Botpress, {{state.$r}}!"], - "typing": true - }, - "createdBy": "admin", - "createdOn": "2018-05-14T00:57:36.026Z" -} -``` - -All content elements of the same content type are stored within a single `.json` file under the `data/bots/{your-bot}/content-elements/` directory. - -:::tip -Remember that a content type tells how content gets rendered and a content element tells what to render. -::: - -## Adding Content - -You can add and edit content in two ways: - -### Flow Editor - -You can add content while creating a node in the Flow Editor. -1. Click the plus button. -1. Choose **say something**. -1. Click the file icon. -1. Choose a content type. -1. Select **Add New**. - -![Adding Content Via Flow Editor](/assets/add-content-flow.png) - -### Content Interface - -In Botpress Studio Interface, you can add content to your chatbot. -1. Navigate to the **Content** tab. -1. Click the plus sign next to **Filter by Content-Type**. -1. Enter the information needed. - -:::tip -You can also add a specific content type by clicking the **plus** button, which appears when you hover over the content title. -::: - -![Adding Content Via Interface](/assets/adding-content.png) - -The content interface is useful for the separation of concerns. You may want a non-technical collaborator to look through the content, editing it for grammar, and creating the desired tone for your chatbot. - -## Translation - -Your chatbots can support multiple languages. If a specific translation is not available for the current language, the chatbot will use the default language. When a user chats with your chatbot, we extract the browser's language and save it as a user attribute (available on the event as `user.language`). - -Once the `user.language` property is set, it won't be overwritten. Therefore, you can ask the user what his preferred language is or use the NLU engine to detect it. - -When rendering content elements, we will try to render the user's configured language; otherwise, it will use the chatbot's default one. - -## Supported Content Types - -### Action Button - -This button triggers an action, often used in cards. You can add two parameters to this button, namely: -- Title: Text written on the button. -- Action: One of _say something, open url_ and _create postback_. - -### Audio - -Allows you to upload an mp3 audio file. The file will be playable within the chat. -![Audio Content](/assets/audio-emulator.png) - -### Card - -A card is a message with a title and an optional subtitle. It also contains an image and action buttons. Note that you first need to create the action button separately. - -### Carousel - -A carousel is an array of cards. This collection of cards can either be presented as a horizontally scrolling slide or a vertical message stack, depending on the channel. - -### File - -The file content type is currently only supported by channel-vonage. It allows you to upload a pdf file which the user can download from the chat. In addition, you can add an optional title which will appear as a message under the file. When loading a file from a variable url, you may need to use triple braces to unescape the url i.e., ```{{{temp.fileUrl}}}```. - -### Image - -To show an image with an optional title in the chat window, you can use the _Image_ content element. Supported image formats are .tiff, .jpg, .png, .jpeg, .gif, .bmp, .tif. When loading an image from a variable url, you may need to use triple braces to unescape the url i.e., ```{{{temp.imageUrl}}}```. - -### Location - -The location content type is currently only supported by channel-vonage. It generates a message showing a location with an optional address and title. Required parameters to complete this content element are longitude and latitude. - -### Single Choice - -This component carries a message, usually a question, and suggests choices to the user to fulfill the message. The user can only pick one option, and on selecting the preference, you can instruct your chatbot to get a custom value. - -### Text - -The text content type denotes a regular text message with optional typing indicators and alternates. You can use markdown in your text to add formatting and style, but please ensure that the target channel can render this text. - -You can write HTML in the text content on the web channel, and your chatbot will render it correctly. This opens up the possibility of including iFrames and constructing miniature web pages (commonly known as web views) in your content without creating custom components. - -### Video - -The video content type presents a message showing a video file with an optional title. You can either upload the video or link to a video file that will be fetched when the content element is invoked. When loading a video from a variable url, you may need to use triple braces to unescape the url i.e., ```{{{temp.videoUrl}}}```. - -### Dropdown - -The dropdown displays a list of options to the user. It includes a message to the user, and you can customize the dropdown placeholder text and the text displayed on the selection button. \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/content-elements/content-image.md b/docs/building-chatbots/flow-editor/content-elements/content-image.md deleted file mode 100644 index 06234b4..0000000 --- a/docs/building-chatbots/flow-editor/content-elements/content-image.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -id: content-image -title: Content - Image ---- - --------------------- - -The image content allows you to integrate an image (a picture) in your chatbot conversation as a distinct message. - -![Image Example](/assets/image-example.png) - -## Supported Formats - -Supported image formats are: - -- `.tiff`; -- `.jpg`; -- `.png`; -- `.jpeg`; -- `.gif`; -- `.bmp`; -- `.tif`. - -:::info -When loading an image from a variable URL, you might need to use triple braces. - -**Example:** `{{{temp.imageUrl}}}` -::: - -## Add an Image in a Node - -1. In the Flow Editor, click the node where you want to add your image. -1. Choose where to put your image: **On Enter**, **On Receive**, or **Transitions**. -1. Click the **+** button. -1. Under **Message**, click the box. - 1. In the **Pick Content** dialog, under **Search In**, select **Image**. - 1. You can either: - - Select an existing image in the list. - :::info - This will bring you directly to step 5. - ::: - - **Create new Image** by clicking the button. - 1. A new window will be displayed where you can modify the following options: - - The **[Image](#image)** button. - - The **[Title](#title)** box. - - The **[Show typing indicators](#show-typing-indicators)** radio button. - 1. Click **Submit**. -1. Click **Add Action (Alt+Enter)**. - -## Options - -When adding a **Image** content, you can modify some options: - -:::tip -When hovering a box where you can type, the `` symbol appears. This button helps you easily insert variables within your message. When you click it, it shows a list of variables that you can use such as `temp.`, `user.`, `session.`, or `event.`. -::: - -### Image - -There are two ways to add an image: - -- Under **Image**, click the square with an up arrow. Then, you can choose which image you want to add there from your storage. -- Under **Image**, click the **Or enter URL** button at the bottom right of the square. A box will appear and you can type the URL of your image. - -:::note -Don't forget to take a look at the list of [supported formats](#supported-formats). -::: - -### Title - -There is a box where you can add a title to your image. This title is displayed when you hover over the picture you just sent. - -:::tip Best Practice -Your title should be short, precise, and relevant. -::: - -### Show Typing Indicators - -The radio button is checked by default. You can uncheck it. - -When your user is chatting with the chatbot, they will see the icon ![Type Indicators](/assets/type_indicators.png) (a bubble with three moving dots) while the chatbot is "typing" before receiving an answer. \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/content-elements/content-text.md b/docs/building-chatbots/flow-editor/content-elements/content-text.md deleted file mode 100644 index 2650b6c..0000000 --- a/docs/building-chatbots/flow-editor/content-elements/content-text.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: content-text -title: Content - Text ---- - --------------------- - -The Text content is one of the most important piece of content that you will use. Those are the textual sentences that your chatbot sends to your user. - -![Text Example](/assets/text-example.png) - -:::info -HTML in the text content is rendered correctly on the web channel. You can include iFrames and construct miniature web pages (or web views) in your content without creating custom components. -::: - -## Add a Text in a Node - -1. In the Flow Editor, click the node where you want to add your text. -1. Choose where to put your text: **On Enter**, **On Receive**, or **Transitions**. -1. Click the **+** button. -1. Under **Message**, click the box. - 1. In the **Pick Content** dialog, under **Search In**, select **Text**. - 1. You can either: - - Select an existing text in the list. - :::info - This will bring you directly to step 5. - ::: - - Type a new text in the **Search Text** bar. - 1. Click **Create new Text**. - 1. A new window will be displayed where you can modify the following options: - - The **[Add Alternates](#alternates)** button. - - The **[Use markdown](#use-markdown)** radio button. - - The **[Show typing indicators](#show-typing-indicators)** radio button. - 1. Click **Submit**. -1. Click **Add Action (Alt+Enter)**. - -## Options - -When adding a **Text** content, you can modify some options: - -:::tip -When hovering a box where you can type, the `` symbol appears. This button helps you easily insert variables within your message. When you click it, it shows a list of variables that you can use such as `temp.`, `user.`, `session.`, or `event.`. -::: - -### Alternates - -Alternates are different sentences that mean exactly the same as the original text. Those will be sent randomly to your users. - -Adding alternates is easy. You just have to click **Add Alternates** and you will be able to write as many alternates as you want in the boxes. - -You can use the trash icon to delete your alternate(s) whenever you want. - -:::tip Best Practice -Adding alternates is recommended since it makes your chatbot more user-friendly. The more alternates you have, the more your chatbot looks "human". -::: - -### Use Markdown - -The radio button is checked by default. You can uncheck it. - -You can use [markdown](https://daringfireball.net/projects/markdown/syntax#overview), which is a markup syntax that allows you to easily add formatting and style to your text. - -:::tip Best Practice -Ensure that the target channel can render this text. -::: - -### Show Typing Indicators - -The radio button is checked by default. You can uncheck it. - -When your user is chatting with the chatbot, they will see the icon ![Type Indicators](/assets/type_indicators.png) (a bubble with three moving dots) while the chatbot is "typing" before receiving an answer. \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/content-elements/content-video.md b/docs/building-chatbots/flow-editor/content-elements/content-video.md deleted file mode 100644 index 639e06d..0000000 --- a/docs/building-chatbots/flow-editor/content-elements/content-video.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -id: content-video -title: Content - Video ---- - --------------------- - -The video content type presents a distinct message with a video file and an optional title. - -:::caution -This content type is only supported in [Botpress Webchat](/messaging-channels/botpress-webchat/website-embedding) and [Vonage](/messaging-channels/broker-integrations/vonage). -::: - -![Video Example](/assets/video-example.png) - -The users can: -- play the video; -- pause it when needed; -- modify the sound level; -- zoom in the video; -- download the video; -- change the playback speed; -- have a picture in picture (a pop-up with the video will appear). - -## Add a Video in a Node - -1. In the Flow Editor, click the node where you want to add your video. -1. Choose where to put your video: **On Enter**, **On Receive**, or **Transitions**. -1. Click the **+** button. -1. Under **Message**, click the box. - 1. In the **Pick Content** dialog, under **Search In**, select **Video**. - 1. You can either: - - Select an existing video in the list. - :::info - This will bring you directly to step 5. - ::: - - Click **Create new Video**. - 1. A new window will be displayed where you can modify the following options: - - The **[Video](#video)** box. - - The **[Title](#title)** box. - - The **[Show typing indicators](#show-typing-indicators)** radio button. - 1. Click **Submit**. -1. Click **Add Action (Alt+Enter)**. - -## Options - -When adding a **Video** content, you can modify some options: - -:::tip -When hovering a box where you can type, the `` symbol appears. This button helps you easily insert variables within your message. When you click it, it shows a list of variables that you can use such as `temp.`, `user.`, `session.`, or `event.`. -::: - -### Video - -There are two ways to add a video: - -- Under **Video**, click the square with an up arrow. Then, you can choose which video you want to add there from your storage. -- Under **Video**, click the **Or enter URL** button at the bottom right of the square. A box will appear and you can type the URL of your video. - -:::info -When loading a video from a variable URL, you might need to use triple braces. - -**Example:** `{{{temp.imageUrl}}}` -::: - -### Title - -This is a box where you can add a title to your video. - -:::tip Best Practice -Your title should be short, precise, and relevant. -::: - -### Show Typing Indicators - -The radio button is checked by default. You can uncheck it. - -When your user is chatting with the chatbot, they will see the icon ![Type Indicators](/assets/type_indicators.png) (a bubble with three moving dots) while the chatbot is "typing" before receiving an answer. \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/content-elements/custom-content-elements.md b/docs/building-chatbots/flow-editor/content-elements/custom-content-elements.md deleted file mode 100644 index 55b784a..0000000 --- a/docs/building-chatbots/flow-editor/content-elements/custom-content-elements.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: custom-content-elements -title: Custom Content Elements ---- - --------------------- diff --git a/docs/building-chatbots/flow-editor/flow-lifecycle/flow-lifecycle.md b/docs/building-chatbots/flow-editor/flow-lifecycle/flow-lifecycle.md deleted file mode 100644 index 39c42ad..0000000 --- a/docs/building-chatbots/flow-editor/flow-lifecycle/flow-lifecycle.md +++ /dev/null @@ -1,160 +0,0 @@ ---- -id: 'flow-lifecycle' -title: 'Flow Lifecycle' ---- - ------------------- - -Botpress uses what we call the **Dialog Engine** to handle conversations, which is responsible of every interaction. It handles the user input and the chatbot response. - -The Dialog Engine uses [Flows](#flows) representing a chatbot's overall conversational logic. A Flow is then composed of [Nodes](#nodes) which execute a series of [Instructions](#node-lifecycle). Instructions are part of a Node lifecycle and can execute [actions](#actions). An action is a code snippet, usually code that you have written yourself, code provided by Botpress or others. - -## Flows - -A workflow allows you to break down a complex chatbot into multiple smaller flows. Breaking down the chatbot into multiple flows makes it easier to maintain, and you can re-use these flows when building other workflows or even other chatbots. - -Let's look at our Botpress support bot **Blitz**. We can add three flows to handle issues, tickets, and troubleshooting. - -![flows](/assets/flows.png) - -### Flow Lifecycle - -A flow always starts at the `startNode` of its `*.flow.json` file, with the **Main** flow being the first to be executed at the beginning of each conversation. The start node points to the node which is to be executed first by name. Once the node is selected, the Dialog Engine will queue the active node's instructions and execute the instructions sequentially. - -The Dialog Engine is event-based and is non-blocking by default, which means that a flow will execute all it can manage until it needs to wait. - -:::note -There are currently two reasons for a flow to "wait": -- A node is marked as waiting for user input; -- A node couldn't match a condition to transition to another node; -- A node has no transition instruction. -::: - -Once the first node is processed, the Dialog Engine will proceed to the next node in the flow until it reaches the very end. Flows are pretty straightforward. Nodes also have a [lifecycle](#node-lifecycle) of their own. They do the heavy lifting in a flow. - -### Storage - -Flows are stored as JSON files in the chatbot's source files. In the context of this tutorial, the flows are stored in the `data/bots/blitz/flows/` folder. Each flow is split into two files: the logic (`*.flow.json`) and the visual-specific properties (`*.ui.json`). The reason to split these is to make it easier to maintain and review changes. - -- `*.ui.json` files can almost always be ignored from code reviews as they don't affect the chatbot's functionality. -- `*.flow.json` files could also, in theory, be created manually by developers instead of using the GUI. This is the case for [Skills](#skills), which we will cover later. - -## Nodes - -Nodes are the primary units of the conversational logic of your chatbot. **An active conversation** (which we call a **session**) always has one and only one active node. A node generally transitions to another node or flow. When there aren't any more transitions, the conversation ends. The following message from the user will then be part of an entirely new session. - -A _node_ is separated into three different stages: **onEnter** (A), **onReceive** (B) and **onNext** (C). - -![Typical Flow Node](/assets/flow_node.png) - -### On Enter - -**onEnter** is a list of instructions executed when the node is **entered**. If multiple actions are defined, your chatbot will execute all of them sequentially. - -### On Receive - -**onReceive** is a list of instructions executed when the node receives a message from the user while it is active. As soon as an action is defined, the node will automatically be waiting for user input (orange node). - -When this property is left unused, the node is non-blocking (black), which means it will flow straight from the `onEnter` to the `onNext`. - -![Blocking vs. Non-Blocking Nodes](/assets/node_blocking.png) - -### onNext - -**onNext** (also called **Transitions**) is precisely the same thing as **Flow-wide Transitions** except that the conditions are only evaluated after `onReceive` or `onEnter` have been executed. - -:::info Special cases -- If no condition is defined, the default behavior is the end of the conversation. -- If there are conditions defined but none match, nothing happens. The current node stays active and will flow when a condition is matched. By default, the `onNext` will only be retried after `onReceive` is re-invoked. -::: - -A **Transition** always has a target that we call a **Destination**. It can be: -- A different node; -- A different flow; -- The previous Fflow; -- Itself (loopback on itself); -- The end of the conversation. - -## State - -Each conversation has an associated **State**. The state is created when the conversation session is started and is destroyed when the session is ended. - -A state is created just before the **entry** node is entered. - -![Lifetime of a conversation state](/assets/stateLifetime.png) - -:::note -The state is global to the conversation, so if the conversation spans multiple flows, they will all share the same state. -::: - -## Session Timeout - -The Dialog Engine will wait for the input of a user. After a while, if the user does not respond, the session will **Timeout**. - -Timeout allows you to end the conversation gracefully if needed. It can also be helpful to do some processing before deleting the session. For instance, you could save the user contact information to an external database, or tell the user how to contact you or inform the user his session has timed out. - -### Timeout Flow - -You can use a **Timeout Flow** to handle your timeout logic. It works just like a regular flow. All you have to do is add a **Flow** called `timeout.flow.json` to your chatbot and specify a start node. Then, the Dialog Engine will detect your **Timeout Flow** next time a user times out. - -### Timeout Node - -Very similar to the **Timeout Flow**, the **Timeout Node** should be called `timeout` and should belong to the current flow. You don't have to link it to any other node. The Dialog Engine will detect the node based on its name. - -### Timeout Transition - -Another option that requires some coding is to add the property `timeoutNode` to your `*.flow.json` file and assign it to the name of the node that should handle the timeout. Again, it can be any node; it doesn't need to be called a particular way. - -:::caution -Once the Dialog Engine has processed the timeout, it will delete the session. -::: - -## Actions - -An **Action** is JavaScript code that is executed in a `Node.js` VM. It can be anything you want: call an API, store something in the database, or store something in the **Key-value Store**. Actions are called by `onEnter` and `onReceive` instructions. There are two types of actions: - -- **Script:** a user-defined Action that is used to run custom code. -- **Output:** an output Action that is used to make a chatbot output something. - -:::note -To learn more on actions, please refer to the [Code Editor](/building-chatbots/flow-editor/actions) section. -::: - -## Skills - -After building a couple of flows/bots, you'll quickly notice that there are some common patterns that you find yourself implementing over and over. Skills come to the rescue. - -Skills are higher-level abstractions on top of flows that serve as dynamic flow generators. - -They can be seen as reusable components between multiple flows or even multiple chatbots. - -### Installing skills - -A module must expose every skill. Modules can host any number of skills. All you need to do is install the required module, and you will have access to its skills. - -### Using skills - -Skills are meant to be used by the Botpress Flows GUI. After - -1. Install the desired skill module. -1. Navigate to the selected flow. -1. Locate the **Insert Skill** toolbar at the left of the flow builder interface. -1. Select your skill. -1. Fill in the form. -1. Click anywhere in the flow to insert the skill. - -![Using the skills from the GUI](/assets/skillsMenu.png) - -### Persistence - -Skills are stored as flows under the `data/bots/your-bot/flows/skills` folder. Skill nodes in the Studio Interface have the name of the skill appended to the node name, making them easily identifiable. - -### Editing skills - -Once a skill node has been generated, you may click on that node and click **Edit** on the right panel to edit that node, which will update the generated flow automatically behind the scenes. - -![Editing a skill from GUI](/assets/skillsEdit.png) - -:::note -While you can rename your skill to any name you want, it is considered best practice to append the skill type to the node name, for example, `choice-choose-topping`. -::: \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/flow-lifecycle/flow-wide-transitions.md b/docs/building-chatbots/flow-editor/flow-lifecycle/flow-wide-transitions.md deleted file mode 100644 index e6343a9..0000000 --- a/docs/building-chatbots/flow-editor/flow-lifecycle/flow-wide-transitions.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -id: flow-wide-transitions -title: Flow-wide Transitions ---- - --------------------- - -## onReceive -You can define an `onReceive` instruction that will always be executed before every node's `onReceive`. - -To define new **Flow-wide On Receive** actions: -1. Navigate to the relevant flow. -1. Double-click anywhere to show the **Flow Properties**. -:::tip -You can also click the links at the top left corner of the flow editor. -::: -1. Under the **On Receive** section, click the **Add Action** button to add a new action. - -![Flow Properties](/assets/flow_wide_onreceive.png) - -## onNext - -A Flow-wide onNext instruction allows you to override node transitions when the condition is successful. - -:::note Examples: -- Authentication Gate: Re-route the user to the login flow if they are not authenticated. -- Sentiment Analysis: Re-route the user to the human fallback node if the conversation is degrading -- Matching flow-wide intents such as "`cancel`" etc. -::: \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/flow-lifecycle/nodes-lifecycle.md b/docs/building-chatbots/flow-editor/flow-lifecycle/nodes-lifecycle.md deleted file mode 100644 index 0778cf5..0000000 --- a/docs/building-chatbots/flow-editor/flow-lifecycle/nodes-lifecycle.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: nodes-lifecycle -title: Nodes Lifecycle ---- - --------------------- \ No newline at end of file diff --git a/docs/building-chatbots/flow-editor/skill-nodes/api-call.md b/docs/building-chatbots/flow-editor/skill-nodes/api-call.md deleted file mode 100644 index eee3424..0000000 --- a/docs/building-chatbots/flow-editor/skill-nodes/api-call.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: api-call -title: API Call ---- - --------------------- - -We developed the Call API skill to help you quickly call an API within your flow. You can then save and use the responses received from the external API in your chatbot's code and flows. - -![From Flow Editor](/assets/call-api-skill-flow.png) - -## Request Options - -Calling an API involves making an HTTP request from Botpress to a named host on a server. The request aims to access a resource on the server. The following are the components of your request through which you will supply information to an API. - -### Body - -The request body is set in the interface below. Please ensure that your request body adheres to the syntax specified for the API you are calling. - -![Main View](/assets/call-api-skill.png) - -### Headers - -The request headers can be set here and should respect the JSON format. - -![Headers](/assets/call-api-skill-headers.png) - -## Response - -All APIs respond to every request with an HTTP status indicating whether the request was successful. The response typically comes along with a json response which may contain additional information. The Call API skill supports receipt and storage of this response in the following manner. - -### Memory - -We use [memory](/building-chatbots/memory-&-data-persistence/flow-memory) to save the response given by the API we are calling. By default, Botpress will save the response in `temp.response`, but you can use the memory of your choice according to the use-case. - -![Memory](/assets/call-api-skill-memory.png) - -The saved response object looks like this: - -```json -{ - "body": , - "status": 200 -} -``` - -### Success / Failure - -When a response returns a status code `400` and above, the request will fail and will execute the `On failure` transition. All other status codes will result in success and will execute the `On success` transition. - -## Templating - -Botpress supports templating in the `body` and the `headers` to access variables stored in [memory](/building-chatbots/memory-&-data-persistence/flow-memory). All `bot`, `user`, `session`, `temp`, and `event` memory types are accessible via templating. - -![Template](/assets/call-api-skill-template.png) diff --git a/docs/building-chatbots/flow-editor/skill-nodes/custom-skills.md b/docs/building-chatbots/flow-editor/skill-nodes/custom-skills.md deleted file mode 100644 index 94e5253..0000000 --- a/docs/building-chatbots/flow-editor/skill-nodes/custom-skills.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: custom-skills -title: Custom Skills ---- - --------------------- diff --git a/docs/building-chatbots/flow-editor/skill-nodes/send-email.md b/docs/building-chatbots/flow-editor/skill-nodes/send-email.md deleted file mode 100644 index 3e94d51..0000000 --- a/docs/building-chatbots/flow-editor/skill-nodes/send-email.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -id: send-email -title: Send Email ---- - --------------------- - -The email skill provides a quick way to send emails from within a Botpress workflow. - -## Creating Your Skill - -1. From the Flow Editor view, click **Insert Skill**. -1. Select **Send Email**. - -The following interface allows you to insert the information you would fill in when using any standard email service: - -- **From, To, CC & BCC:** These fields are filled with email addresses. - - _From_: sender's email address - - _To_: recipient's email - - _CC_ (_carbon copy_): visible email addresses who receives a copy - - _BCC_ (_blind carbon copy_): invisible email addresses who receives a copy - -- **Subject:** subject of the email, a content element as the subject line. - -:::note -Even if you use markdown in the subject line, it will render as plain text. -::: - -- **Email Content:** content element, a message to be sent. - -:::note -Unlike the subject field, you can use markdown, which Botpress will render correctly to the receiver. You can also include HTML to enhance the formatting of your email body further. -::: - -Botpress supports templating in all fields of your email skill, allowing access to variables stored in Memory. All `bot`, `user`, `session`, `temp`, and `event` are accessible via templating. - -## Configuring Email Skill - -To send an email using the email skill, you need to configure your chatbot with a transport connection string. Set the configuration string in the directory `...data/global/config/basic-skills.json`. For more information on the mail transporters available and how to configure them, please visit the [Nodemailer documentation](https://nodemailer.com/smtp/#examples). - -You can edit those variable in Botpress from the **Code Editor**. - -**Example:** - -```json -{ - "$schema": "../../assets/modules/basic-skills/config.schema.json", - "defaultContentElement": "builtin_single-choice", - "defaultContentRenderer": "#builtin_single-choice", - "defaultMaxAttempts": 3, - "disableIntegrityCheck": true, - "matchNumbers": true, - "matchNLU": true, - "transportConnectionString": { - "host": "192.168.100.200", - "port": "25", - "secure": false, - "tls": { - "rejectUnauthorized": false - } - } -} -``` - -The `transportConnectionString` could be an object or a string. - -- **String** - -``` -smtps://example@gmail.com:superPassword@smtp.gmail.com -``` - -- **Object Format** - -``` - "transportConnectionString": { - "host": "192.168.100.200", - "port": "25", - "secure": false, - "tls": { - "rejectUnauthorized": false - } - } -``` - -:::note Notes -- Setting `"rejectUnauthorized": false` will prevent the Botpress server from rebooting every time an email fails to send. We recommend a fall-back strategy if this happens using the `on failure` transition. -- If your email is protected with 2FA, it might not work. -::: diff --git a/docs/building-chatbots/flow-editor/skill-nodes/single-choice.md b/docs/building-chatbots/flow-editor/skill-nodes/single-choice.md deleted file mode 100644 index 68fa9a4..0000000 --- a/docs/building-chatbots/flow-editor/skill-nodes/single-choice.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -id: single-choice -title: Single Choice ---- - -The choice skill provides a way to select one choice of many in free text format or with buttons. - -![choice](/assets/skills/choice-answer.png) - -## Creating a Choice Skill - -1. From the Flow Editor view, click **Insert Skill**. -1. Select **Choice** - ![select-choice](/assets/skills/choice.png) -1. Select or create a **single choice** content-type - ![choice-generating](/assets/skills/choice-generating.png) - -:::note -You can disabled free text if you want your user to only be able to click buttons. -::: - -### Single Choice options - -#### Message - -The message is the question your bot will ask. - -#### Choice - -Create choice related to a question. - -##### Message - -Label for the choice. This is what is displayed on the button. - -##### Value - -Value to expect for the selected option, for yourself. - -### Using Intent Detection for Advanced Choice Recognition - -Intents can also be used as the value to be able to catch variations of answers, and are manage in the NLU page. This is really useful for channels that don't support inline buttons like text messaging, where people type similar, yet not exact answers. - -You can accomplish this by adding `intent:INTENT_NAME` as a value to your choice skill. Then, make sure your `INTENT_NAME` exists in the NLU > Intents menu and has utterances. - -![intent](/assets/skills/intent.png) diff --git a/docs/building-chatbots/flow-editor/skill-nodes/slot-filling.md b/docs/building-chatbots/flow-editor/skill-nodes/slot-filling.md deleted file mode 100644 index 5a33501..0000000 --- a/docs/building-chatbots/flow-editor/skill-nodes/slot-filling.md +++ /dev/null @@ -1,127 +0,0 @@ ---- -id: slot-filling -title: Slot Filling ---- - --------------------- - -Slots are a significant concept in Botpress NLU. You can think of them as necessary **parameters** to complete the action associated with an intent. - -## Slot Tagging - -Botpress Native NLU will tag each _word_ (token) of user input. Words separated by a hyphen are treated as one token. If the token is correctly identified as a slot, it will be attached to the NLU extraction event. Each identified slot will be accessible in the `event.nlu.slots` object using its name as the key. - -### Defining Slots - -To define a slot for a particular intent: - -1. Click the **NLU** tab. -1. Open the **Intent Section**. -1. Select the intent you want to add slots to, then you'll be able to define your slots. -1. Click on **Create a Slot**. - -![create slot](/assets/nlu-create-slot.png) - -Let's use a `book_flight` intent. To book a flight, we'll define two slots: `departure` and `destination`, both associated with the `Airport Codes` custom list entity. Once that is done, we need to identify every airport slot. - -![tag slots](/assets/nlu-tag-slot.png) - -### Example - -The user said: `I would like to go to SFO from Mumbai.` - -`event.nlu.slots` will look like: - -```js -slots : { - airport_to: { - name: 'airport_to', - value: 'SFO', // shorthand for entity.data.value - entity: [Object] //detailed extracted entity - }, - airport_from: { - name: 'airport_from', - value: 'BOM', // shorthand for entity.data.value - entity: [Object] //detailed extracted entity - } -} -``` - -## Slot Filling - -Slot filling is the process of gathering information required by an intent. This information is defined as _slots_ as we mentioned in the above section. It handles input validation and the chatbot's reply when the input is invalid. Botpress has an in-built skill to handle the slot filling process. - -### Creating a Slot Skill - -We will use the slots which we defined earlier in this tutorial. - -1. In the Flow Editor view, click on **Insert skill** > **Slot**. -2. Choose an intent to use for the slot filling. -3. Choose a slot to fill. -4. Choose the content that your chatbot will ask. It should be a question about the information you seek, such as "From where are you departing?" or "Where do you want to go?" etc. -5. Choose the content for your chatbot reply when the input is invalid. It should guide the user towards a valid answer. - -![Skill Slot Overview](/assets/slot-skill-overview.png) - -### Validation Types - -There are two types of validations: - -1. **Input validation**: The first validation is based on entity extraction. If the provided information doesn't match the entity of the slot, the chatbot will notify the user. This will not apply when the slot has the type `@system.any`. In this case, the chatbot will ultimately provide the complete user phrase when it fails to match a slot confidently. -2. **Custom Input Validation**: you can use an action to add custom validation, such as regex or type validation (number, string). The action should set the variable `temp.valid` to either `true` or `false` based on the validation result. - -### Max retry attempts - -How many times the chatbot should try to get the correct answer. `On not found` outcome will be triggered when the maximum is reached. - -### Outcomes - -Three outcomes are possible: - -1. `On extracted` - The slot has been successfully extracted. It will be stored in `session.slots.`. -2. `On not found` - The slot has not been extracted. This will also happen when the maximum number of retries is reached or when custom validation fails. -3. `On already extracted` - The slot has previously been extracted. One use-case for that would be to ask the user if the previous information is still relevant or if he would like to overwrite it. - -![Slot skill outcomes](/assets/slot-skill-outcomes.png) - -## Chaining Multiple Slots - -You can chain multiple skills to fill all the slots for a given intent. Chaining skills is handy when all the slots in a given intent are mandatory for a data set to be complete. In the flight booking example, we need the `departure city`, `destination city`, and `time of departure` to check if a flight is available. Since these fields are mandatory, this is a good use case for skill chaining. - -![Skill Slot Flow](/assets/slot-skill-flow.png) - -This flow will result in a conversation like the one below. Notice that in the first phrase, `I want to book a flight to NYC`, the intent `book-flight` is matched, and NYC has been extracted as the `to` slot. Then, the chatbot tries to fill the remaining slots `from` and `when`. - -![Skill Slot Convo](/assets/slot-skill-convo.png) - -## Guidelines When Adding Slots - -- Mix the positions of the slots in the utterances. - -**Example:** - -![Mix Slots](/assets/slots-mix.png) - -- Avoid duplication when using slots. - -**Example - to avoid:** - -![Duplicated Slots](/assets/slot-mix.png) - -- Limit the number of slots used for a given Intent. - -Suggestion: maximum of 3 - -- Try mixing utterances with the slots to be: filled, partially filled, or empty. - -**Example:** - -![Filling Slots](/assets/slots-fill-mix.png) - -- Examples in utterances should match the defined entity. - -**Example:** - `Entity list`: Google, Slack, Github, Email - `Intent`: `Reset Trello password` (Slot value is not part of the list) - -- When using slots, there have to be at least five utterances with an example of the slot; the more slots, the more utterances with examples. \ No newline at end of file diff --git a/docs/building-chatbots/language-understanding/entities/entities.md b/docs/building-chatbots/language-understanding/entities/entities.md deleted file mode 100644 index 4c2194e..0000000 --- a/docs/building-chatbots/language-understanding/entities/entities.md +++ /dev/null @@ -1,94 +0,0 @@ ---- -id: entities -title: Entities ---- - --------------------- - -Entities are intent parameters. They represent a concept such as a colour, a date, a time, or a weight. Entity extraction helps you extract and normalize desired entities if they are present in a user phrase or message to the chatbot. - -:::note -The following example comes from the [Intent Classification](/building-chatbots/language-understanding/intents) page. -::: - -**Example:** -The `place-order` intent contains the following entities: -- `caffeine` that specifies if the coffee is caffeinated or decaffeinated. -- `size` for a single or a double shot. -- `drink` that specifies the kind of drink asked. - -Attached to NLU extraction, you will find an entities property which is an array of [System](#system-entities) and [Custom](#custom-entities) entities. - -## Using Entities - -You may access and use entity data by looking up the `event.nlu.entities` variable in your hooks, flow transitions, or actions. - -### Example of Extracted Entity: - -The user said: `Let's go for five miles run.` - -```js -{ - /* ... other event nlu properties ... */ - entities: [ - { - type: 'distance', - meta: { - confidence: 1 - provider: 'native', - source: 'five miles', // text from which the entity was extracted - start: 15, // beginning character index in the input - end: 25, // end character index in the input - }, - data: { - value : 5, - unit: 'mile', - extras: {} - } - }, - { - type: 'numeral', - meta: { - confidence: 1 - provider: 'native', - source: 'five', // text from which the entity was extracted - start: 15, // beginning character index in the input - end: 19, // end character index in the input - }, - data: { - value : 5, - extras: {} - } - } - ] -} -``` - -:::note -In some cases, you will find additional structured information in the extras object. -::: - -## Custom Entities -Botpress provides two types of custom entities: [pattern](#pattern-extraction) and [list](#list-extraction) entities. To define a custom entity, go to the **Entity section** of the NLU Module interface accessible from the Botpress studio sidebar. From there, you can define your custom entities which will be available for any input message treated by your chatbot. Go ahead and click on **create new entity** - -## Placeholder Extraction -Botpress Native NLU also has a system entity of type `any`, which is essentially a placeholder. For this feature to work optimally, a lot of training data is required. Before identifying slots [see slots docs](#slots) as entity type `any`, try to use custom entities. - -An example of a placeholder entity would be: Please tell **Sarah** that **she's late** - -For placeholder extraction, please take note of the points below. -- When using a slot with system.any - Capitalization matters -- The any-type slots try to generalize, without any help from patterns and existing keywords, so they look for: -- The size of the words -- The surrounding words -- Whether the first letter is capital -- Whether all the letters are capital or not -- The presence of punctuation or symbols (like hyphens) -- The meaning of the word VS the other vocabulary - -Consider that the any-type slot should be used as the last resort and requires at least ten times as much data as any other form of entity extraction via slots. - -## Sensitive Information -Messages sent between users and the chatbot are stored in the database, which means that sometimes your chatbot may save personal information (e.g., a credit card number) as well. To protect the chatbot user's confidential information, use the small checkbox located in the upper right corner labeled `sensitive` when creating such entities. - -When checked, your chatbot will still display the information in the chat window, but the sensitive information will be replaced by `*****` before being stored. The original value is still available from `event.nlu.entities` diff --git a/docs/building-chatbots/language-understanding/entities/list-entities.md b/docs/building-chatbots/language-understanding/entities/list-entities.md deleted file mode 100644 index 4fa27b6..0000000 --- a/docs/building-chatbots/language-understanding/entities/list-entities.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: list-entities -title: List Entities ---- - --------------------- - -List extraction behaves similarly to pattern extraction. However, you'll be able to add different **occurrences** of your entity with corresponding synonyms. - -Let's take **Airport Codes** as an example: - -Extraction will go like this: - -| User said | Type | Value | -| :----------------------------------: | :-------------: | :------------: | -| _"Find a flight from SFO to Mumbai"_ | "Airport Codes" | ["SFO", "BOM"] | - -```js -;[ - { - name: 'Airport Codes', - type: 'list', - meta: { - confidence: 1, - provider: 'native', - source: 'SFO', - start: 19, - end: 22, - raw: {} - }, - data: { - extras: {}, - value: 'SFO', - unit: 'string' - } - }, - { - name: 'Airport Codes', - type: 'list', - meta: { - confidence: 1, - provider: 'native', - source: 'Mumbai', - start: 26, - end: 32, - raw: {} - }, - data: { - extras: {}, - value: 'BOM', - unit: 'string' - } - } -] -``` \ No newline at end of file diff --git a/docs/building-chatbots/language-understanding/entities/pattern-entities.md b/docs/building-chatbots/language-understanding/entities/pattern-entities.md deleted file mode 100644 index 112cbfd..0000000 --- a/docs/building-chatbots/language-understanding/entities/pattern-entities.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: pattern-entities -title: Pattern Entities ---- - --------------------- - -Pattern or Regular Expression Extraction allows you to extract information presented in a format that can be described using Regular Expression (RegEx). Once you've created a pattern entity, Botpress Native NLU will perform a regex extraction on each incoming message and add it to `event.nlu.entities`. - -**Example:** - -Given a Pattern Entity definition with `[A-Z]{3}-[0-9]{4}-[A-Z]{3}` as pattern: - -Extraction will go like this: - -| User said | Type | Value | -| :-------------------------: | :---: | :------------: | -| `Find product BHZ-1234-UYT` | `SKU` | `BHZ-1234-UYT` | - -```js -{ name: 'SKU', - type: 'pattern', - meta: - { confidence: 1, - provider: 'native', - source: 'BHZ-1234-UYT', - start: 13, - end: 25, - raw: {} }, - data: { - extras: {}, - value: 'BHZ-1234-UYT', - unit: 'string' - } -} -``` \ No newline at end of file diff --git a/docs/building-chatbots/language-understanding/entities/system-entities.md b/docs/building-chatbots/language-understanding/entities/system-entities.md deleted file mode 100644 index 910b6ad..0000000 --- a/docs/building-chatbots/language-understanding/entities/system-entities.md +++ /dev/null @@ -1,42 +0,0 @@ ---- -id: system-entities -title: System Entities ---- - --------------------- - -## Duckling Extraction - -Botpress Native NLU offers a handful of system entity extraction thanks to [Facebook/Duckling](https://github.com/facebook/duckling). This engine allows you to extract known entities like Time, Ordinals, Date, and so on. For a complete list of system entities, please head to [Duckling documentation](https://github.com/facebook/duckling). - - By default, Botpress uses an instance of Duckling hosted on our remote servers. If you don't want your data to be sent to our servers, you can either disable this feature by setting `ducklingEnabled` to `false` or host your duckling server and change the `ducklingURL` in the `data/global/config/nlu.json` config file. - -Please check the Deployment section for instructions on hosting your Duckling server. - -**Example:** - -| User said | Type | Value | Unit | -| :-----------------------------: | :--------: | :-----: | :-----: | -| `Add 5 lbs of sugar to my cart` | `quantity` | `5` | `pound` | - -```js -{ - type: 'quantity', - meta: { - confidence: 1, - provider: 'native', - source: '5 lbs', // text from which the entity was extracted - start: 4, // beginning character index in original input - end: 9, // end character index in original input - }, - data: { - value : 5, - unit: 'pound', - extras: {} - } -} -``` - -:::note -Confidence will always be one due to the rule-based implementation of Duckling. -::: \ No newline at end of file diff --git a/docs/building-chatbots/language-understanding/external-nlu-engines.md b/docs/building-chatbots/language-understanding/external-nlu-engines.md deleted file mode 100644 index 1fa7358..0000000 --- a/docs/building-chatbots/language-understanding/external-nlu-engines.md +++ /dev/null @@ -1,171 +0,0 @@ ---- -id: external-nlu-engines -title: External NLU Engines ---- - --------------------- - -Botpress native NLU runs on-premise and supports a finite set of languages. If you plan to develop chatbots in languages that Botpress does not support or if you want to use another NLU solution, then you'll need to set up a 3rd party NLU connector. To achieve this, we'll use the power of Botpress hooks). - -## Define Languages -One use-case for a 3rd party NLU is to support more languages in addition to those handled by Botpress Native NLU. For Botpress to keep working correctly with an additional language (defining intents & content), you'll have to tell Botpress the new languages you want to support. To do so, open `botpress.config.json` and set the `additionalLanguages` property. Let's say we want to support **Swedish** and **Norwegian**, the configuration would look like the following: - -```json -{ - "additionalLanguages": [ - { - "code": "sv", - "name": "Swedish" - }, - { - "code": "no", - "name": "Norwegian" - } - ] -} -``` - -Now that you're done, you can go in your chatbot config page and choose the language(s) you want your chatbot to support. Note that multilingual is a Botpress Enterprise License feature. - -## Sync NLU Data to 3rd Party -This function lets you use the Botpress NLU interface to define your intents, entities, and slots. Intents and entities are stored as JSON in BPFS (formerly ghost) on the local filesystem or in the database. - -To sync data, we need to listen to any intents/entities changes and persist the data to our 3rd party NLU (please go through the listening to file changes tutorial for more information). This way, when one edits intents or entities in the NLU UI, we get notified. We can do this with a Botpress after bot mount hook. You can use the code editor module to create hooks easily. Here's how the code for our `fileWatcher` hook looks like: - -```js -async function sync(bp: typeof sdk, botId: string) { - // create a BPFS (ghost) instance for our bot - const ghost = bp.ghost.forBot(botId) - - // listen on file changes - ghost.onFileChanged(async file => { - console.log(file) - }) -} - -//those parameters are accessible in the current scope -return sync(sdk, botId) -``` - -`onFileChanged` is called with the file name containing changes when a file is either created, edited or deleted. What we want to do now is to check if the change is relevant (e.g., change in intents/entities) and sync the data to your custom NLU. Our hook will now look like this: - -```js -const axios = require('axios') -async function sync(bp: typeof sdk, botId: string) { - const ghost = bp.ghost.forBot(botId) - ghost.onFileChanged(async f => { - if (f.includes('intents') || f.includes('entities')) { - // we get all intents - const intentNames = await ghost.directoryListing('intents', '*.json') - const intents = await Promise.all(intentNames.map(name => ghost.readFileAsObject('intents', name))) - // we get all entities - const entNames = await ghost.directoryListing('entities', '*.json') - const entities = await Promise.all(entNames.map(name => ghost.readFileAsObject('entities', name))) - // TODO process intents and entities in the format required by your NLU - - /* - * Here, you would call your own NLU provider by HTTP with processed data - * - * await axios.post('http://NLUprovider/train', {intents, entities}) - * - */ - } - }) -``` - -Here you go; you can now still use the Botpress NLU UI to define your intents/entities and push training data to your NLU engine. - -## Use your 3rd Party NLU for Classification and Extraction -We will use a similar strategy during prediction time. What we want to do is call our 3rd party NLU for each incoming user message. We will use a before incoming hook, executed when Botpress receives a user message. The code is not complex if you keep in mind that Botpress works with a precise data structure, so you'll need to map the response data of your NLU provider to the [Botpress NLU data format](https://botpress.com/reference/interfaces/_botpress_sdk_.io.eventunderstanding.html). The hook will look like the following: - -```ts -async function hook(bp: typeof sdk, event: sdk.IO.IncomingEvent) { - /** Your code starts below */ - - const myHook = async (bp, event) => { - const _ = require('lodash') - - /** - * Returns the detected language (e.g. 'en', 'fr', 'es', etc) given a string of text - */ - const detectLanguage = async text => { - // Here, you can use your own service to detect the language given the user's text - const response = await axios.get('https://langdetect.yourdomain.com', { input: text }) - return response.data.lang - } - - /** - * Given an input and its language, returns a nlu-compatible object - */ - const predict = async (lang, text) => { - // Important: the result must have this structure in order - // for Botpress to process it correctly downstream - const result = { - entities: [], - language: lang, - detectedLanguage: lang, - ambiguous: false, - slots: {}, - intent: { name: 'none', confidence: 1, context: 'global' }, - intents: [], - errored: false, - includedContexts: ['global'], - ms: 0 - } - - let response - switch (lang) { - case 'en': - // You - response = await axios.get('https://en-server.yourdomain.com', { input: text }) - // You are responsible for mapping the response's data - // to the result object, so it conforms with Botpress's expected format - result.intent = response.data.intent - break - case 'fr': - // We only use intents from this service - response = await axios.get('https://detect.nlpfrancais.fr', { input: text }) - result.intents = response.data.result.intentions - break - case 'es': - // This service returns more relevant information. We reuse - // slots, intents and intent from the service's response - response = await axios.get('https://nlufrancais.anothercompany.com', { input: text }) - result.slots = response.data.slots - result.intents = response.data.intents - result.intent = response.data.intent - break - default: - break - } - - return result - } - - // Filter out unwanted events - if (event.type === 'session_reset' || event.type === 'visit' || event.type === 'bp_dialog_timeout') { - return - } - - // We must disable the native NLU for this even, - event.setFlag(bp.IO.WellKnownFlags.SKIP_NATIVE_NLU, true) - - // Now, we detect the language from the user's input - const detectedLanguage = await detectLanguage(event.payload.text) - - // Then we process the user's input, knowing the user's language - const result = await predict(detectedLanguage, event.payload.text) - - // Finally, we overwrite the nlu property of the event with our results - _.assign(event, { - nlu: result - }) - } - - return myHook(bp, event) - - /** Your code ends here */ -} -``` - -That's about it; you now have Botpress integrated with your 3rd party NLU. diff --git a/docs/building-chatbots/language-understanding/hosting.md b/docs/building-chatbots/language-understanding/hosting.md deleted file mode 100644 index 84c6dc2..0000000 --- a/docs/building-chatbots/language-understanding/hosting.md +++ /dev/null @@ -1,91 +0,0 @@ ---- -id: hosting -title: Hosting NLU Servers ---- - --------------------- - -Botpress communicates with two services to work correctly: Duckling and a Language Server. If your Botpress installation has no internet access, you'll have to host these services on-prem. When following the different hosting methods, look for a section on on-prem hosting for further details. - -## Duckling - -We use Duckling to extract system entities (time, email, currency, etc.). This service is very light and requires minimal resources. - -### Hosting Duckling on Linux and Mac - -On these two Operating Systems, Duckling must be compiled. Therefore, you will need to install the software development tools and build from the source. - -Please follow the instructions on the [GitHub page of Duckling](https://github.com/facebook/duckling). We may provide some binaries in the future for common OS'. - -### Hosting Duckling on Windows - -If you run Botpress on Windows, there is a `.zip` file available [here](https://s3.amazonaws.com/botpress-binaries/tools/duckling/duckling-windows.zip). -Double-click on `run-duckling.bat` (the `bat` file sets the console's code page to UTF-8, then runs the executable). The folder `zoneinfo` includes the Olson timezones, which are already available by default on other OS. - -### Configuring your Chatbot - -When you have successfully installed the duckling binary, edit the file `data/global/config/nlu.json` and set the parameter `ducklingURL` to where you run Duckling, for example, if it's on the same server as Botpress (and if you use the default port of `8000`), you will set: - -```json -{ - ... - "ducklingURL": "http://localhost:8000" -} -``` - -## Language Server - -The Language Server is used to provide the language models necessary to run the NLU. It is quite resource-intensive to host a language server due to the model sizes. To make it easy to get started, the default installation uses a Botpress-hosted Language Server. You can swap it out for your own (see below). - -:::note -The NLU server is not the same as the language server, and uses the models provided by the language server. -::: - -By default, Botpress configures the Language Server to get `100` dimensions for words. If you plan to use that Language Server in production, we highly recommend setting the dimensions to `300` for a better vocabulary. - -| Dimensions | RAM Usage | Disk Usage | -| ---------- | ------------ | ------------- | -| 100 | about 1.3 Gb | about 900 Mb | -| 300 | about 3.5 Gb | about 3 Gb | - -All of this is per language. - -### Installing a Language Library - -1. Open this metadata file: https://botpress-public.nyc3.digitaloceanspaces.com/embeddings/index.json. -2. Download the `bpe` and `embeddings` files corresponding to your languages. For instance, for French, download the `bp.fr.bpe.model` file located under `remoteUrl` and the `bp.fr.300.bin` also located under `remoteUrl`. -3. Once the files are downloaded, place them somewhere on your server filesystem and take note of the path. -4. Add the `--offline` and the `--dim < number >` arguments to your command when starting the language server. i.e. `./bp lang --offline --dim --langDir `. Ensure that the dimension argument matches the dimensions of the models you have downloaded, e.g., `bp.en.300.bin` (Please note that you have to run this command in a directory that contains a functional copy of the Botpress binary). - -:::note -`300` is the number of dimensions the model has. More dimensions mean the model size is bigger. You can choose a lighter model if your server specs are limited, but keep in mind that you need to change the `--dim` parameter when you start the Language Server (e.g. `./bp lang --dim < number >`). -::: - -| Abbreviation | Language | -| ------------ | ---------- | -| ar | Arabic | -| en | English | -| fr | French | -| ja | Japanese | -| pt | Portuguese | -| ru | Russian | -| de | German | -| es | Spanish | -| he | Hebrew | -| it | Italian | -| nl | Dutch | -| pl | Polish | - -### Running your Language Server - -The language server is embedded in Botpress and can be started using the command line. Here are the steps to run it and use it with your Botpress Server: - -1. Start the language server with `./bp lang`. -2. In `data/global/config/nlu.json`, change `languageSources.endpoint` to `http://localhost:3100`. -3. Restart Botpress and open the Languages page on the Admin. -4. Install the desired languages your server should support. -5. Restart the language server with parameters `./bp lang --readOnly`. - -:::note -`ReadOnly` prevents anyone from adding or removing languages and can only be used to fetch embeddings. There are additional parameters that can be configured (for example, to require authentication); you can see them by typing `./bp lang help`. -::: \ No newline at end of file diff --git a/docs/building-chatbots/language-understanding/intents/intents.md b/docs/building-chatbots/language-understanding/intents/intents.md deleted file mode 100644 index 050ffd6..0000000 --- a/docs/building-chatbots/language-understanding/intents/intents.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -id: intents -title: Intents ---- - --------------------- - -Recognizing the meaning of user messages is essential. Not only identifying them but accurately classifying them is also critical. To do so, you can program your chatbot to extract information from a natural conversation (a conversation with a human). - -When you create an intent, you also create various utterances. Utterances represent the different statements your user can use for the same intention. - -**Example - Ordering a coffee:** - - - I want coffee - - I'd like some coffee, please - - Do you have a decaf espresso? - - Hi. I'd like to order a latte, please. Normal, single shot. - -You can add these different utterances to train your chatbot to answer an intent instead of a specific word. The user statements are compared and matched with the most appropriate intent, with the highest confidence percentage. - -| User Message | Intent Matched | Confidence | -| :-----------------------------------------------: | :----------------: | :--------: | -| "_An espresso, please_" | place-order | 0.97 | -| "_I would like to order a coffee._" | place-order | 0.91 | -| "_Can you please give me a double cappuccino?_" | place-order | 0.96 | - -## Adding an Intent - -To create a new intent, - -1. In your Conversation Studio, click the NLU module on the right sidebar. -2. Click the **+** button. -3. Give it a friendly name. -4. Click **Submit**. -5. Write your utterances next to the number (where you can see **Type a sentence**). - -Don't forget that: - -- **Punctuation** is ignored for text classification, except for hyphens. -- **Hyphens** between words are joined as a single word. -- **Case sensitivity** is ignored, which means that all text is converted to lowercase. - -**Examples:** - -| User message | Is converted to | -| :------------------------------------------------------------: | :--------------------------------------------------------------: | -| Hi! Could you please give me a single shot of coffee? Thanks! | hi could you please give me a single shot of coffee thanks | -| Do you have any cappuccino available? | do you have any cappuccino available | - -## Responding to an Intent - -You can detect and reply to intents by analyzing the `event.nlu.intent.name` variable in your hooks, flow transitions, or actions. - -**Example:** - -```js -{ - "type": "text", - "channel": "web", - "direction": "incoming", - "payload": { - "type": "text", - "text": "hey" - }, - "target": "AwIiKCRH4gH2GBJgQZd7q", - "botId": "my-new-bot", - "threadId": "5", - "id": 1.5420658919105e+17, - "preview": "hey", - "flags": {}, - "nlu": { // <<<<------ - "language": "en", // language identified - "intent": { // most likely intent, assuming confidence is within config threshold - "name": "hello", - "context": "global", - "confidence": 1 - }, - "intents": [ // all the intents detected, sorted by probabilities - { - "name": "hello", - "context": "global", - "confidence": 1 - }, - { - "name": "none", - "context": "global" - "confidence": 1.94931e-8 - } - ], - "entities": [], // extracted entities - "slots" : {} // extracted slots - } -} -``` - -:::note -You can use that metadata to create transitions when a specific intent is detected inside a particular flow. You can learn more about flows and transitions. -::: - -## Confidence and Debugging - -To enable debugging, ensure that `debugModeEnabled` is set to `true` in your `data/global/config/nlu.json` file. - -:::tip -In a production environment, you can also use the `BP_NLU_DEBUGMODEENABLED` variable instead of modifying the configuration directly. -::: - -**Example:** - -NLU Extraction - -```js -{ text: 'hey there bud', - intent: 'hello', - confidence: 0.966797, - bot_min_confidence: 0.5, - bot_max_confidence: 100, - is_confident_enough: true, - language: 'en', - entities: [ ] -} -``` \ No newline at end of file diff --git a/docs/building-chatbots/language-understanding/intents/slots.md b/docs/building-chatbots/language-understanding/intents/slots.md deleted file mode 100644 index 815e834..0000000 --- a/docs/building-chatbots/language-understanding/intents/slots.md +++ /dev/null @@ -1,126 +0,0 @@ ---- -id: slots -title: Slots ---- - --------------------- - -Slots are a significant concept in Botpress NLU. You can think of them as necessary parameters to complete the action associated with an intent. - -## Slot Tagging - -Botpress Native NLU will tag each _word_ (token) of user input. Words separated by a hyphen are treated as one token. If the token is correctly identified as a slot, it will be attached to the NLU extraction event. Each identified slot will be accessible in the `event.nlu.slots` object using its name as the key. - -### Defining Slots - -1. In the Conversation Studio, access you Natural Language Understanding module. -1. Open the **Intent section**. -1. Select the intent you want to add slots to, then you'll be able to define your slots. -1. Click **Create a Slot** - -![create slot](/assets/nlu-create-slot.png) - -Let's use a `book_flight` intent. To book a flight, we'll define two slots: `departure` and `destination`, both associated with the `Airport Codes` custom list entity. Once that is done, we need to identify every airport slot. - -![tag slots](/assets/nlu-tag-slot.png) - -### Example - -The user said: `I would like to go to SFO from Mumbai.` - -`event.nlu.slots` will look like: - -```js -slots : { - airport_to: { - name: 'airport_to', - value: 'SFO', // shorthand for entity.data.value - entity: [Object] //detailed extracted entity - }, - airport_from: { - name: 'airport_from', - value: 'BOM', // shorthand for entity.data.value - entity: [Object] //detailed extracted entity - } -} -``` - -## Slot Filling - -Slot filling is the process of gathering information required by an intent. This information is defined as _slots_ as we mentioned in the above section. It handles input validation and the chatbot's reply when the input is invalid. Botpress has an in-built skill to handle the slot filling process. - -### Creating a slot skill - -We will use the slots which we defined earlier in this tutorial. - -1. In the Flow Editor, click **Insert skill**, then **Slot**. -2. Choose an intent to use for the slot filling. -3. Choose a slot to fill. -4. Choose the content that your chatbot will ask. It should be a question about the information you seek, such as `From where are you departing?`, `Where do you want to go?`, etc. -5. Choose the content for your chatbot reply when the input is invalid. It should guide the user towards a valid answer. - -![Skill Slot Overview](/assets/slot-skill-overview.png) - -### Validation Types - -There are two types of validations: - -- **Input validation:** The first validation is based on entity extraction. If the provided information doesn't match the entity of the slot, the chatbot will notify the user. This will not apply when the slot has the type `@system.any`. In this case, the chatbot will ultimately provide the complete user phrase when it fails to match a slot confidently. -- **Custom Input Validation:** You can use an action to add custom validation, such as regex or type validation (number, string). The action should set the variable `temp.valid` to either true or false based on the validation result. - -### Max retry attempts - -How many times the chatbot should try to get the correct answer. `On not found` outcome will be triggered when the maximum is reached. - -### Outcomes - -Three outcomes are possible: - -- **On extracted:** The slot has been successfully extracted. It will be stored in `session.slots.`. -- **On not found:** The slot has not been extracted. This will also happen when the maximum number of retries is reached or when custom validation fails. -- **On already extracted:** The slot has previously been extracted. One use-case for that would be to ask the user if the previous information is still relevant or if he would like to overwrite it. - -![Slot skill outcomes](/assets/slot-skill-outcomes.png) - -## Chaining Multiple Slots - -You can chain multiple skills to fill all the slots for a given intent. Chaining skills is handy when all the slots in a given intent are mandatory for a data set to be complete. In the flight booking example, we need the `departure city`, `destination city`, and `time of departure` to check if a flight is available. Since these fields are mandatory, this is a good use case for skill chaining. - -![Skill Slot Flow](/assets/slot-skill-flow.png) - -This flow will result in a conversation like the one below. Notice that in the first phrase `I want to book a flight to NYC`, the intent `book-flight` is matched, and `NYC` has been extracted as the `to` slot. Then, the chatbot tries to fill the remaining slots `from` and `when`. - -![Skill Slot Convo](/assets/slot-skill-convo.png) - -## Guidelines When Adding Slots - -- Mix the positions of the slots in the utterances - -**Example:** - -![Mix Slots](/assets/slots-mix.png) - -- Avoid duplication when using slots - -**Example - to avoid:** - -![Duplicated Slots](/assets/slot-mix.png) - -- Limit the number of slots used for a given Intent -Suggestion: maximum of 3 - -- Try mixing utterances with the slots to be: filled, partially filled, or empty - -**Example:** - - -![Filling Slots](/assets/slots-fill-mix.png) - -- Examples in utterances should match the defined entity - -**Example:** - - `Entity list`: Google, Slack, Github, Email - `Intent`: “Reset Trello password” (Slot value is not part of the list) - -- When using slots, there have to be at least five utterances with an example of the slot; the more slots, the more utterances with examples. diff --git a/docs/building-chatbots/language-understanding/questions-&-answers/question-&-answers.md b/docs/building-chatbots/language-understanding/questions-&-answers/question-&-answers.md deleted file mode 100644 index d430cb3..0000000 --- a/docs/building-chatbots/language-understanding/questions-&-answers/question-&-answers.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: questions-&-answers -title: Questions & Answers ---- - --------------------- - -The QnA module is specifically designed to simplify how to handle frequently asked questions. It adds more responsivness to your chatbot. You need to add at least ten different training phrases. Then, you add at least one answer: plain text or any other content type. - -:::note -You can also redirect a user to a specific node and workflow as a response to the question. -::: - -![Adding a QnA](/assets/qna-overview.png) - -## Create a Context - -1. Access your Conversation Studio. -1. Click the Q&A tab. -1. Click the + button at the top right of the page. -:::note -It creates a new Q&A. -::: -1. Under **Contexts**, type the context you want to add. - -:::tip -You can alternatively create a context as follows: -1. Create a context specific to: - - one chatbot, create or edit this file `data/bots//config/qna.json`. - - all chatbots, create or edit this file `data/global/config/qna.json`. -2. Append the name of your new contexts to `qnaCategories` as follows: - -```json -{ - "$schema": "../../../assets/modules/qna/config.schema.json", - "qnaCategories": "global,monkeys,giraffes" -} -``` -::: - -:::note -Contexts listed in the dropdown menu are sourced from all your existing content (questions & NLU intents). The `qna.json` configuration file is no longer used to provide a list of contexts. -::: - -![New Context](/assets/faq-qna-new-context.png) - -## Add a QNA - -Once you have created your contexts, you can create your QNAs and assign a context to them. From the `category` menu, choose one of your contexts: - -![QnA Category](/assets/faq-qna-category.png) - -# Add Contexts to your Flow - -The final step is to set the desired context at the appropriate time in your flow. To help you with this, we added 3 built-in actions (e.g., `appendContext`, `resetContext` and `removeContext`), under the NLU category in your actions list. - -### Append Context - -To set a context, use the `appendContext` action and add your new context in the `contexts` field. You can use comma-separated values to pass multiple contexts. - -![Actions](/assets/faq-append-context.png) - -### TTL - -The TTL or Time-To-Live field is used to set a maximum number of interactions for this context to exists within a conversation. - -:::note Example -Take `Welcome Bot` for instance. Its contexts have a TTL of `10`. - -This means that someone can ask up to 10 questions about animals before the context is ignored. After the TTL expires, the chatbot will fall back to the `global` context. -::: \ No newline at end of file diff --git a/docs/building-chatbots/language-understanding/supported-languages.md b/docs/building-chatbots/language-understanding/supported-languages.md deleted file mode 100644 index a269425..0000000 --- a/docs/building-chatbots/language-understanding/supported-languages.md +++ /dev/null @@ -1,58 +0,0 @@ ---- -id: supported-languages -title: Supported Languages ---- - ---- - -Normally, you only have one language for your chatbot. However, you can add other languages by translating your content. - -:::note -With the Enterprise License, you can easily work with the built-in translation functionality. -::: - -## Supported Languages - -- Arabic -- Dutch -- English -- French -- German -- Hebrew -- Italian -- Japanese -- Polish -- Portuguese -- Russian -- Spanish - -## Add a Language - -1. In the Admin section, click **Bots**. -2. Click the **Config** button next to the selected bot. -3. In the **General** section: -<<<<<<< HEAD - 1. Under **Default language**, use the dropdown menu to select the desired default language which is gonna be used in the interface. - 2. Under **Supported languages**, with the dropdown menu or by writing it in the box, choose the languages you need. - :::note - The **Supported languages** section appears only when you enable the [Enterprise Licensing](/enterprise/licensing/enterprise-licensing). - ::: -======= - 1. Under **Default language**, use the dropdown menu to select the desired default language which is gonna be used in the interface. - 2. Under **Supported languages**, with the dropdown menu or by writing it in the box, choose the languages you need. ->>>>>>> 3db29d3ee0b6679a65ced6320d0f4c7dc9f457bc -4. Click **Save Changes**. - -![Bot Config](/assets/i18n-configs.png) - -## Change the Language - -Botpress use the browser language to detect the user language. This is stored in the `language` field of the user attributes. It is possible to change the language of a user by modifying this field as the following example shows: - -```js -await bp.users.updateAttributes("web", "someId", { language: "fr" }); -``` - -:::tip -Take a look at [updateAttributes](https://botpress.com/reference/modules/_botpress_sdk_.users.html#updateattributes) for more information. -::: diff --git a/docs/building-chatbots/memory-&-data-persistence/flow-memory.md b/docs/building-chatbots/memory-&-data-persistence/flow-memory.md deleted file mode 100644 index 1eb458b..0000000 --- a/docs/building-chatbots/memory-&-data-persistence/flow-memory.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -id: flow-memory -title: Flow Memory ---- - --------------------- - -In a conversation, you may want to ask questions to the user and remember his answers to use them later. You may also want to access the values of system parameters, such as the values of the slots that your chatbot just extracted. - -## System Parameters - -When a user talks to a chatbot, Botpress tracks all variables and parameters associated with that chatbot as the chatbot transitions from one state to another. If you run the debugger, you will see the tree of all the system parameters that it tracks. Just click the debugger button (circled in red below) and it will open in the bottom panel by default. - -![How to Access Debugger](/assets/access-debugger.png) - -You can access these system parameters from the Flow Editor and within your code (including in actions). To do so, all you need to do to reference a parameter by prefixing the path shown in the emulator with `event.`. - -For example, the path shown in the debugger to the language parameter is `nlu.language`. You can reference that parameter by adding `event.` to the path shown in the debugger, such as `event.nlu.language`. - -![NLU Language Emulator](/assets/nlu-emulator.png) - -In the Flow Editor, you can access system parameters by bracketing them with two sets of curly brackets. - -:::note -The user input language is `{{event.nlu.language}}`. -::: - -You can also set variables to be the value of a system parameter as follows: - -![NLU Language Set Variable](/assets/nlu-variable.png) - -For raw expressions or code (such as in actions), you don't need the curly brackets. Here is an example of a raw expression in a transition: - -![NLU Language Raw Expression](/assets/nlu-raw-expression.png) - -In the same way, as described above, it's possible to access the values of extracted slots by copying the path from the emulator and prefixing it with `event.` (e.g., `{{state.session.slots.food.value}}`) in the flow builder and `state.session.slots.food.value` in code. `food` is a slot that was set up intent by the chatbot builder. - -![Slot Extraction Emulator](/assets/slot-extraction-emulator.png) - -As is possible in JavaScript, it is also possible to access the parameters with the following syntax: - -`{{state.session.slots["food"].value}}` - -## Variables - -There are four different kinds of memories in Botpress; the difference between them is the duration and the scope. - -- `user` memory is kept forever for the user it is associated with. -- `session` memory is kept for the duration of the configured session. -- `temp` memory is only kept for the duration of the flow. -- `bot` memory is the same value for all users of the same chatbot. - -## Common Use Case - -Most of the time, you will rely on the `user` and `temp` type of memory. The `temp` memory is only alive for the duration of a flow. - -## Setting and Accessing Variables - -Variables can be set up or declared using the **Set Variable** action (see the [Dialog Memory](#dialog-memory) section below) or code. When using the **Set Variable** action dialog, the variable is set up and assigned a value. - -:::note -In code, the variable is declared simply by using it. -::: - -As with system parameters (see [System Parameters](#system-parameter) section), variables can be accessed in the flow builder and the **Set Variable** dialog by bracketing the variables with double curly brackets (such as `{{temp.user_name}}`). - -:::note -In code or raw expressions, the reference to the variable would not need the double curly brackets. -::: - -For example, your chatbot would reference the variable as: - -`temp.user_name` - -### Bot Memory - -The `bot` memory is the same value for all users of the chatbot. Think of it as a global variable but scoped to this chatbot only. - -## How to Change What's in the Memory? - -The most straightforward way is to use the action `base.setVariable`. You only have to specify the type of memory, the variable's name, and what value your chatbot should set it to. - -Another common use is with actions. Actions allow you to edit these variables directly. For example, you could write `user.firstname = 'potato'` in your code file to update the user's name. \ No newline at end of file diff --git a/docs/building-chatbots/memory-&-data-persistence/general-purpose-storage.md b/docs/building-chatbots/memory-&-data-persistence/general-purpose-storage.md deleted file mode 100644 index 51c4f2f..0000000 --- a/docs/building-chatbots/memory-&-data-persistence/general-purpose-storage.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -id: general-purpose-storage -title: General-Purpose Storage ---- - --------------------- - -What if the four types of storage don't fulfill my requirements? Don't worry; we still have other options! - -The **Key-Value Store** is a general-purpose store that allows you to store any data. You will need to manage expirations and data update yourself since Botpress will not update these values independently. - -The KVS is available from the [Botpress SDK](https://botpress.com/reference/modules/_botpress_sdk_.kvs.html). \ No newline at end of file diff --git a/docs/building-chatbots/memory-&-data-persistence/session-memory.md b/docs/building-chatbots/memory-&-data-persistence/session-memory.md deleted file mode 100644 index c446e4e..0000000 --- a/docs/building-chatbots/memory-&-data-persistence/session-memory.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -id: session-memory -title: Session Memory ---- - --------------------- - -## Dialog Memory - -The Dialog Memory is how your chatbot remembers things in the context of a conversation. The way you can store and retrieve data is by using actions inside the flows. There are four types of memory available: **user**, **session**, **temp** and **bot**. The value of type in the **Set Variable** user interface must be set to one of these four types. - -You can consume a memory action just like any other action from the Botpress Flow Editor. - -**Example:** - -![Flow Memory Action](/assets/flow-memory-action.png) - -## Temporary Memory - -The `temp` memory is the most frequently used type of memory in Botpress. This memory is kept from the beginning of flow until the end. As long as nodes are linked together, `temp` memory will be available. - -:::note -If you were a user of Botpress 10.x, this was better known as the `state` of the dialog. -::: - -Typical use cases include calling an action, saving the result in the `temp` memory, and send a content element including the answer to the user. - -:::note Example -You want to list the name of your servers, which your chatbot should fetch from an API. - -This would be your action, `fetch_servers.js`: - -```js -const listServers = async () => { - try { - const { data } = await axios.get(`https://mysite.com/servers`) - temp.servers = data.servers.join(', ') - } catch (error) {} -} - -return listServers() -``` - -That action would fetch the name of your servers; then you could send a content element similar to this: - -`Here's the list of our servers: {{temp.servers}}` -::: \ No newline at end of file diff --git a/docs/building-chatbots/memory-&-data-persistence/user-memory.md b/docs/building-chatbots/memory-&-data-persistence/user-memory.md deleted file mode 100644 index d9ad58f..0000000 --- a/docs/building-chatbots/memory-&-data-persistence/user-memory.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -id: user-memory -title: User Memory ---- - --------------------- - -Variables set using the `user` namespace are saved as attributes for the user. This means that those attributes will always follow the user. - -When a user sends a message to the chatbot, the first middleware loads that user's information. After processing everything, any changes to the `user` object will be persisted in the database. - -This means that you can alter the `user` object using middlewares and actions, and your chatbot will save it at the end. - -## User Memory - Data Retention - -Since privacy is an important matter, a built-in system makes it easy to set retention periods for different types of information. You could have, for example, a policy that says "email expires after two months" or "remember user's mood for one day". Then, whenever the user's attribute is changed, the expiration policy is updated. - -Here's how it could be configured: - -```js -//data/global/botpress.config.json - -dataRetention: { - janitorInterval: '2m', // Check each 2 mins for expired data - policies: { - email: '60d', // Keep email for 30 days, reset if it is changed - mood: '1d' // Forget user's mood after 1 day - someChoice: '5m' // Keeps the variable alive for 5 minutes - } -} -``` - -## Session Memory - -The `session` store last for the user's session, depending on the setting of `sessionIntervalTimeout` in `botpress.config.json`. - -This is also where we keep the last messages sent by the user. This information is used by the Decision Engine to understand the user's intent better and to avoid repeating meaningless stuff. \ No newline at end of file diff --git a/docs/building-chatbots/qna/qna-item/answer-and-alternate.md b/docs/building-chatbots/qna/qna-item/answer-and-alternate.md deleted file mode 100644 index 782344c..0000000 --- a/docs/building-chatbots/qna/qna-item/answer-and-alternate.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -id: answer-and-alternate -title: Answer and Alternate ---- - --------------------- - -When you use the Q&A section, you can have a question (or more, which is recommended) and one answer or you can create alternate answers. Those are randomly sent to the users. This makes the chatbot more "human". - -Alternate answers have a different structure, but their meaning stays the same. - -## Add Answers and Alternates - -1. In the [Conversation Studio](/overview/quickstart/conversation-studio), click the **Q&A** tab. -1. If not done yet, [create a question](/building-chatbots/qna/qna-item/question-variations). -1. Under **Answer**, type the basic answer to the question in the box. -1. Click **+ Add Answer Alternatives**. -1. Type as many alternatives you need. -:::tip Best Practice -Press `enter` after typing your answer. It quickly adds a new alternative. -::: -1. You might have to train your chatbot again. -1. Try it with the **[Emulator](/building-chatbots/testing-&-debugging/emulator)**. - -The number of answers is not important. It could be 1 or 10, or even more, it won't make a difference for the Language Understanding. However, for the [questions](/building-chatbots/qna/qna-item/question-variations), you might want to add different utterrances to teach your chatbot that it doesn't have to precisely match the question asked. - -## Answers and Alternates Examples - -When a user ask for the opening hours, you could add those alternate answers: - -- `Monday to Friday from 8AM to 5PM.` -- `We are opened from Monday to Friday at 8AM until 5PM.` -- `Our opening hours are from 8AM to 5PM on weekdays. ` -- `You can reach us from 8AM to 5PM every day of the week.` -- `The store opens at 8AM and closes at 5PM every weekday.` -- etc. - -## Tags - -You can see some tags at the top right of the page. - -### Can't Be Saved - -When hovering the tag, you can see what is wrong: leaving the question or the answer field empty will disable the question. - -It disappears when the problem is solved. - -### Incomplete - -When you have one question, only the exact match will trigger an answer from the chatbot. - -It disappears when the problem is solved. - -### *X*Q · *X*A - -The `X` represents the number of questions and answers that you have for this Q&A. \ No newline at end of file diff --git a/docs/building-chatbots/qna/qna-item/context.md b/docs/building-chatbots/qna/qna-item/context.md deleted file mode 100644 index a6cc726..0000000 --- a/docs/building-chatbots/qna/qna-item/context.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -id: context -title: Context ---- - --------------------- - -Contexts are simple single words that are related to a specific situation, circonstance, concept, etc. - -:::tip Best Practice -You should use contexts only for the questions and answers, not for replacing slot filling. -::: - -## Step 1 - Create a context - -To create a context, you have two options: - -### In the Conversation Studio - -1. Click the **Q&A** tab. -1. Click the **+** button at the top right of the page. -1. Under **Contexts**, type the context you want to add. - -:::note -Don't forget to create your [questions](/building-chatbots/qna/qna-item/question-variations) and [answers](/building-chatbots/qna/qna-item/answer-and-alternate). -::: - -### In the Config File - -:::tip Best Practice -It's way easier to add a context directly in the Conversation Studio. -::: - -- Create context specific to a bot, create (or edit) this file `data/bots//config/qna.json`. -- Create context specific to all bots, create (or edit) this file `data/global/config/qna.json`. - -## Step 2 - Append your Context - -To set a context, let's use the `appendContext` action and add our new context in the `contexts` field. You can use comma-separated values to pass multiple contexts. - -![Actions](/assets/faq-append-context.png) - -Then append the name of your new contexts to `qnaCategories` like so: - -```json -{ - "$schema": "../../../assets/modules/qna/config.schema.json", - "qnaCategories": "global,monkeys,giraffes" -} -``` - diff --git a/docs/building-chatbots/qna/qna-item/qna-item.md b/docs/building-chatbots/qna/qna-item/qna-item.md deleted file mode 100644 index cbc6d54..0000000 --- a/docs/building-chatbots/qna/qna-item/qna-item.md +++ /dev/null @@ -1,71 +0,0 @@ ---- -id: qna-item -title: QnA Item ---- - --------------------- - -QnA is specifically designed to simplify how to handle frequently asked questions. It adds more responsivness to your chatbot. You need to add at least ten different training phrases. Then you add at least one answer: plain text or any other content type. - -:::note -You can also redirect a user to a specific node and workflow as a response to the question. -::: - -![Adding a QnA](/assets/qna-overview.png) - -## Create a Context - -1. Access your Conversation Studio. -1. Click the Q&A tab. -1. Click the + button at the top right of the page. -:::note -It creates a new Q&A. -::: -1. Under **Contexts**, type the context you want to add. - -:::tip -You can alternatively create a context as follows: -1. Create a context specific to: - - one chatbot, create or edit this file `data/bots//config/qna.json`. - - all chatbots, create or edit this file `data/global/config/qna.json`. -2. Append the name of your new contexts to `qnaCategories` as follows: - -```json -{ - "$schema": "../../../assets/modules/qna/config.schema.json", - "qnaCategories": "global,monkeys,giraffes" -} -``` -::: - -:::note -Contexts listed in the dropdown menu are sourced from all your existing content (questions & NLU intents). The `qna.json` configuration file is no longer used to provide a list of contexts. -::: - -![New Context](/assets/faq-qna-new-context.png) - -## Add a QNA - -Once you have created your contexts, you can create your QNAs and assign a context to them. From the `category` menu, choose one of your contexts: - -![QnA Category](/assets/faq-qna-category.png) - -## Add Contexts to your Flow - -The final step is to set the desired context at the appropriate time in your flow. To help you with this, we added 3 built-in actions (e.g., `appendContext`, `resetContext` and `removeContext`), under the NLU category in your actions list. - -### Append Context - -To set a context, use the `appendContext` action and add your new context in the `contexts` field. You can use comma-separated values to pass multiple contexts. - -![Actions](/assets/faq-append-context.png) - -### TTL - -The TTL or Time-To-Live field is used to set a maximum number of interactions for this context to exists within a conversation. - -:::note Example -Take `Welcome Bot` for instance. Its contexts have a TTL of `10`. - -This means that someone can ask up to 10 questions about animals before the context is ignored. After the TTL expires, the chatbot will fall back to the `global` context. -::: \ No newline at end of file diff --git a/docs/building-chatbots/qna/qna-item/question-variations.md b/docs/building-chatbots/qna/qna-item/question-variations.md deleted file mode 100644 index fc7a360..0000000 --- a/docs/building-chatbots/qna/qna-item/question-variations.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -id: question-variations -title: Question Variations ---- - --------------------- - -There are always specific questions that are asked a lot by your customers. This is why you can easily add questions and their answer without having to do it within the flow. - -## Add a Question - -1. In the [Conversation Studio](/overview/quickstart/conversation-studio), click the **Q&A** tab. -1. Click the **+** button to create a new question. -1. In the **Q&A** page, write your first question under **Question** where you can see `Write a sentence that your user could write to ask his/her question`. - :::note - - Typing 3 sentences enables the machine learning. - - Typing 10 sentences makes your Q&A more resilient. - ::: - :::tip Best Practice - Press `enter` after typing your answer. It quickly adds a new alternative question. - ::: -1. Type your [answer(s)](/building-chatbots/qna/qna-item/answer-and-alternate). - -## Questions Examples - -When a user ask for the opening hours, you could add those alternate questions: - -- `When are you opened?` -- `I can't find the opening hours, can you help me?` -- `Opening hours, please.` -- `What are the opening hours?` -- `Tell me when you're opened in the morning` -- etc. - -## Tags - -You can see some tags at the top right of the page. - -### Can't Be Saved - -When hovering the tag, you can see what is wrong: leaving the question or the answer field empty will disable the question. - -It disappears when the problem is solved. - -### Incomplete - -When you have one question, only the exact match will trigger an answer from the chatbot. - -It disappears when the problem is solved. - -### *X*Q · *X*A - -The `X` represents the number of questions and answers that you have for this Q&A. \ No newline at end of file diff --git a/docs/building-chatbots/studio-interface.md b/docs/building-chatbots/studio-interface.md deleted file mode 100644 index 923db8e..0000000 --- a/docs/building-chatbots/studio-interface.md +++ /dev/null @@ -1,89 +0,0 @@ ---- -id: studio-interface -title: Studio Interface ---- - --------------------- - -:::note -Selecting a bot brings you to the Conversation Studio. -::: - -The Conversation Studio allows you to: -- create a new flow for a new chatbot; -- refine the natural language understanding; -- edit the conversational flow after testing it; -- manage everything related to your conversational design; -- train a NLU model; -- test and debug your chatbot; -- and so much more. - -![conversation-studio-intro](/assets/conversation-studio-intro.png) - -## Flows - -The **Flows** page helps you create a conversational flow with a user-friendly interface. - -## Content Management - -The **Content Management** page lists all the different content types (such as action button, dropdown, text, etc.) and the content that you added. - -:::note -You can modify the content directly in the **Content Management** page instead of the **Flows** page. -::: - -## Natural Language Understanding - -The **Natural Language Understanding** page allows you to add intents, entities and their slots. - -## Q&A - -The **Q&A** page allows you to add frequently asked questions and their answers. - -## Libraries - -The **Libraries** page allows you to import your custom code by using hooks and actions. - -## Analytics - -The **Analytics** page displays dashboards that contains analytics information gathered in the conversations with users. - -## Bot Improvement - -The **Bot Improvement** page allows you to manage the negative feedbacks given by the users and use them to improve your chatbot. - -## Broadcast - -The **Broadcast** page allows you to send information to a large amount of people. - -## Code Editor - -The **Code Editor** page allows you to create and edit actions, hooks, libraries, configurations, and module configurations without leaving the Botpress Conversation Studio. - -## HITL - -:::note -This is the older version of HITL Next. -::: - -The **HITL** page allows you to integrate human in the loop of the conversation when a human intervention is needed. - -## HITL Next - -:::note -This is an improved version of HITL. -::: - -The **HITL Next** page allows you to integrate human in the loop of the conversation when a human intervention is needed. - -## Misunderstood - -The **Misunderstood** page lists what the user wrote that triggered the error-handling flow or when they send the negative comments about the Q&A. - -## Testings - -The **Testings** page allows you to create conversation scenarios to ensure the bot keep its good behaviour whether the scenario. Those are unit tests. - -## Config - -The **Config** page displays the available bot configurations split in 3 sections: General, Additional Details, and Avatar & Cover Picture. \ No newline at end of file diff --git a/docs/building-chatbots/testing-&-debugging/debugger.md b/docs/building-chatbots/testing-&-debugging/debugger.md deleted file mode 100644 index b2a5b6f..0000000 --- a/docs/building-chatbots/testing-&-debugging/debugger.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: debugger -title: Debugger ---- - --------------------- - -Botpress uses the [debug](https://www.npmjs.com/package/debug) package to log information about dialogs, hooks, middleware, NLU, and others. - -To see all the logs, set: -- In source code: `DEBUG=bp:* yarn start` -- In the binary: `DEBUG=bp:* ./bp` - -You can set multiple namespaces by separating them by a comma: - -```shell -# On Linux / Mac -DEBUG=bp:nlu:*,bp:dialog:* yarn start - -# On Windows -set DEBUG=bp:nlu*,bp:dialog:*&& yarn start -``` - -## Setting Default Namespaces - -You can add `DEBUG` to your `.env` file located in your root folder to set default namespaces. - -```shell -DEBUG=bp:dialog:*,bp:nlu:intents:* -``` - -## Available Namespaces - -:::note -This feature is experimental and is subject to change -::: - -Go to `/admin/debug` to see a complete list of the available namespaces. The **super-admin role is required** to access this page. -You can also enable or disable them from this screen: - -![Debugging](/assets/debugging.png) diff --git a/docs/building-chatbots/testing-&-debugging/emulator.md b/docs/building-chatbots/testing-&-debugging/emulator.md deleted file mode 100644 index e5f0cb8..0000000 --- a/docs/building-chatbots/testing-&-debugging/emulator.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -id: emulator -title: Emulator ---- - --------------------- - -You can debug your bot conversation by using the built-in Emulator Window. - -:::note -To visualize the entire user experience, you should use the Web Channel directly. -::: - -## Open the Emulator - -- Press `e` anywhere in the application; -- Click the Emulator icon in the status bar. - -![Emulator Window](/assets/emulator_icons.png) - -## Close the Emulator - -You can close the Emulator by: -- pressing **ESC** on your keyboard; -- clicking again on the emulator icon. - -## Resend the Same Messages - -Pressing **↑** or **↓** on your keyboard in the text input allows you to navigate and re-send previously sent messages quickly. - -:::info -The last 20 messages sent to this bot are persisted in your browser storage. -::: - -## Payload Inspector - -The payload inspector lets you see and understand what the bot understood and why it took the decision he chose. Inside the emulator, you will see the metadata about NLU, the conversation State, and the raw responses. - -![Emulator Window](/assets/emulator_win_inspector.png) - -![Emulator Window](/assets/emulator_win_raw_json.png) - -## Sessions - -All the messages you send with the Emulator comes from the same user from the bot's perspective. - -To start a conversation from scratch, you can press the **Toggle List View** button in the Emulator menu. It generates a new user, so all previously set variables and states are forgottent. - -## Testing Module - -The **Testing** module allows you to simulate a conversation over and over again. This is useful when constructing a workflow that works with a set series of answers from the user. It is also handy to make sure that Q&As are being detected and handled as intended. - -To activate the **Testing** module, enable it in `botpress.config.json` as follows: - -``` - { - "location": "MODULES_ROOT/testing", - "enabled": true - }, -``` \ No newline at end of file diff --git a/docs/chatbot-management/agent-handover/human-in-the-loop/hitl.md b/docs/chatbot-management/agent-handover/human-in-the-loop/hitl.md deleted file mode 100644 index 1c60bc7..0000000 --- a/docs/chatbot-management/agent-handover/human-in-the-loop/hitl.md +++ /dev/null @@ -1,78 +0,0 @@ ---- -id: hitl -title: HITL ---- - --------------------- - -:::note -A new, more feature-rich version of HITL. You can try it today. See docs [here](/chatbot-management/agent-handover/human-in-the-loop/hitlnext). -::: - -Botpress allows you to build a powerful tool for autonomous communication with your users. However, some use cases are hard to implement as a chatbot workflow or are not yet supported by your chatbot. - -Botpress offers a human handoff system, which transfers a conversation from your chatbot to an agent. The agent can view these conversations in the **HITL** module (short for Human-in-the-Loop). Human-in-the-Loop is currently supported on `channel-web` and `channel-messenger` only. - -Once you have this module installed, you will be able to: - -1. Pause a user's conversation with the bot manually or programmatically. -2. Alert your agents that a conversation requires attention. -3. As an agent, you will be able to continue the conversation via the admin panel. -4. Resume conversation with the bot. - -## Pausing Conversation - -There are several ways you can pause the conversation: - -- From the HITL module, toggling the pause button. - -![Pause button](/assets/hitl_pause.png) - -- By performing an API-request: - -`let base = EXTERNAL_URL + '/api/v1/bots/' + botId + '/mod/hitl` - -- POST {$base}/sessions/{$id}/pause -- POST {$base}/sessions/{$id}/unpause -- POST {$base}/channel/{$channel}/user/{\$userId}/pause -- POST {$base}/channel/{$channel}/user/{\$userId}/unpause - -For example: - -```js -POST http://localhost:3000/api/v1/bots/welcome-bot/mod/hitl/sessions/13/pause -``` - -## Alerting Agents - -There are a number of ways to alert your agents of a paused conversation, an email, a call to an external API or, as in the example below, via a notification in the admin-panel: - -```js -const { botId } = event -const message = user.first_name + ' wants to talk to a human' -bp.notifications.create(botId, { message, level: 'info', url: '/modules/hitl' }) -``` - -The agent can then navigate to the appropriate conversation and take over the conversation from the bot. - -::: -In the latest versions, the notification bell is absent from the UI, so you will need to make a component to get the info from the notifications table or use a sendEmail action after pausing the conversation to alert agents. - -## Resuming the Conversation - -Once the agent has finished assisting the user, they can unpause the conversation, which hands it back to the chatbots control. - -It is also possible for the user to unpause the conversation by calling the API endpoint. - -## Displaying a Users Name - -You may want to display the name of your chatbot user instead of the random string displayed in the HITL module studio interface.You can store the name in user attributes using an action. For example, if you have already captured the first name and last name in a user variable you can set as follows: - -```js - const setUserFullName = async () => { - user.full_name = user.first_name + ' ' + user.last_name - bp.users.setAttributes(event.channel, event.target, user) - } - - return setUserFullName() -``` diff --git a/docs/chatbot-management/agent-handover/human-in-the-loop/hitlnext.md b/docs/chatbot-management/agent-handover/human-in-the-loop/hitlnext.md deleted file mode 100644 index 306f870..0000000 --- a/docs/chatbot-management/agent-handover/human-in-the-loop/hitlnext.md +++ /dev/null @@ -1,206 +0,0 @@ ---- -id: hitlnext -title: HITL Next ---- - --------------------- - -This revamped HITL works on **all existing and future channels**. It supports all features of its predecessor and a few more : - -- Multi-agents ( _enterprise edition only_ ) -- Human handoff from any workflow -- Real-time agent interface -- Agent notes -- End-user profile -- Configurable transfer and assignment messages -- Message templates -- Basic queuing and assignent system -- Basic labeling - -However, unlike its predecessor, this module only allows you to view conversations that have been paused by Botpress during a workflow using an action. As such, an agent cannot monitor live conversations between the chatbot and a user. - -## Requirements - -This module uses the `channel-web` to display conversations, so make sure it's enabled. - -:::info -A multi-agent setup needs an enterprise license. -::: - -## Setup - -Turn on HITL-next on the module management page of your Botpress Admin. -![Enable Module](/assets/enable-module.png) - -You can also enable the module directly in your `botpress.config.json` file as shown [here](/enterprise/user-management-and-security/role-based-access-control/collaborators). - -## Agent Interface - -The Studio interface has three main sections: - -- **Handoffs:** a list of all conversation handoffs created by users by triggering the handoff action. -- **Conversation:** conversations between the chatbot and user. The agent can chat with a user once the conversation is assigned. -- **Contact Details:** where an agent sees user profile, agent notes, and tags. - -![Agent Interface](/assets/agent-interface.png) - -## Adding Agents - -Revamped HITL allows multiple agents to collaborate on the platform. As a Botpress workspace administrator, you can invite agents the same way you would invite administrators or developers to your workspace. - -1. In your Botpress Admin, click the **Collaborators** tab. -1. Click **Add Collaborator**. - 1. Fill in your agent email. - 1. Choose an **Authentication Strategy** in the dropdown menu, if needed. - 1. Select **Agent** as their role. -1. Click **Create Account** or **Add to Workspace**. - -![Collaborators](/assets/collaborators.png) -![Agent Collaborator](/assets/agent-collaborator.png) - -## Agent Profile - -For an agent's name and avatar to display to users, they can configure their profile as follows: -1. In the Admin, click the avatar icon at the top right corner. -1. Select the **Update Profile** option. Then, fill in the boxes: - 1. **First Name** - 1. **Last Name** - 1. **Profile Picture**. - -![Agent profile](/assets/agent-profile.png) - -## Handoffs - -The module ships with a `Handoff` [action](https://botpress.com/docs/main/code#actions) that you can use wherever you want in your workflows. To add such an action, select a node in a workflow, and hit the **+** below **on enter**, then choose the **handoff** action. - -![Handoff Action](/assets/handoff-action.png) - -Every time that node is triggered, the **Handoffs** section shows a new pending handoff in the list. By clicking a user, you can see a preview of the conversation. On the user side, your chatbot automatically sends a transfer message. This message is [customizable](#advanced-features-and-customization). - -![Tranfer Message](/assets/transfer-message.png) - -### Handoff Assignation and Resolution - -To pick a handoff and start conversing with the end-user, an agent first needs to set theirselves *Oonline** at the top right corner of the Agent Interface. This simple feature allows agents or coordinators to oversee conversations while offline. It is also handy when your team implements any auto-assignation rule. - -![Online](/assets/online.gif) - -Once online, an agent can click on any handoff item and click on the **Assign to Me** button top right corner of the conversation section. When a conversation is transferred to an agent, your chatbot will automatically send a message to the user. This message is [customizable](#advanced-features-and-customization). - -![Assign Message](/assets/assign-message.png) - -:::note -There is no limit on how many handoffs an agent can handle at once. A good practice would be to limit to 3. -::: - -Once the discussion with the user is over, an agent can hand back the control to the Chatbot by simply clicking the **Resolve** button. - -### User Profile - -When a handoff item is selected, user variables are displayed in the user profile section. You can set user variables in any workflow using the built-in `SetVariable` action with the `user` scope. For more details, head to the [variables docs](https://botpress.com/do/docs/conversation-studio/tutorials/use-data#variables). - -The displayed user name is a user variable. Set `fullName` as a user variable for it to show up in the user profile. - -![User profile](/assets/user-profile.png) - -### Agent Notes - -A simple but powerful tool for collaboration over time, notes are associated with underlying conversations and not with the handoff item itself, making them persist from one handoff to another. - -![Agent Notes](/assets/comments.png) - -## Advanced Features and Customization - -Here are the most commonly used module configurations. You can check out the [module configuration file](https://github.com/botpress/botpress/blob/master/modules/hitlnext/src/config.ts) for all options. - -To set any of those configurations, you'll first need to open up the `hitlnext.json` in the **Code Editor** section of your Conversation Studio. - -![Module Configuration](/assets/hitl-config.png) - -Below is the raw configuration file available on path `...\data\global\config\hitlnext.json`: - -```json -{ - "$schema": "../../assets/modules/hitlnext/config.schema.json", - "agentSessionTimeout": "10m", - "autoComplete": { - "trigger": ":", - "shortcuts": [] - }, - "messageCount": 10, - "defaultUsername": false, - "tags": [], - "enableConversationDeletion": false, - "transferMessage": { - "en": "You are being transferred to an agent.", - "fr": "Vous êtes transféré à un agent." - }, - "assignMessage": { - "en": "You have been assigned to our agent {{agentName}}.", - "fr": "Vous avez été assigné à notre agent(e) {{agentName}}." - } -} -``` - -### Transfer and Assignation Messages - -To change **Transfer message** (default being `You are being transferred to an agent.`), change the `transferMessage` json object. You can also translate the message as follows: - -```json -"transferMessage": { - "en": "I'm tranfering you to our support team.", - "de": "Ich schicke dich zur Unterstützung." -} -``` - -:::note -These changes will be applied when you either disable your chatbot and re-enable it or restart your Botpress server. -::: - -The same technique applies to **Assignation Message**. Note that you can optionnally use the `agentName` variable. - -### Message Templates - -If your team of agents often uses the same set of answers, the `autoComplete` configuration can store pre-written messages. They are a handy shortcut for agents, and you can add as many as you want. - -Here is how they show up in the Agent Interface: - -![Shortcuts](/assets/shortcuts.png) - -Before adding a message template, choose a `trigger` character that will open up the templates list. In this example, we will use "**:**". Then, for each of your messages, add a `name` (appears on the left of each template, used to filter down the list as the agent types) and a `value` (the actual message that Botpress will paste in the composer). To summarize, configuration for the example above would look as follows: - -```json -"autoComplete": { - "trigger": ":", - "shortcuts": [ - { - "name": "hi", - "value": "Hello you, I'm your kind agent, here to help you with whatever questions you might have." - }, - { - "name": "qa", - "value": "Did I answer all of your questions properly, is there anything else I can help you with today?" - }, - { - "name": "bye", - "value": "Thank you for trusting us, have a wonderful day." - } - ] -} -``` - -### Handoff Labels - -Handoff labels are useful for agents to categorize handoffs before resolution so that in future handoffs, agents can quickly understand the last conversation with an agent. Labels are also useful when analyzing resolved handoffs, either for quality assurance or for reporting. - -![Labels](/assets/labels.png) - -:::info -You can add as many as you want, but a good practice is to start with a small number of labels and add new ones when necessary. -::: - -**Example:** - -```bash -"tags": ["shipping", "warranty","complaints"] -``` diff --git a/docs/chatbot-management/broadcast.md b/docs/chatbot-management/broadcast.md deleted file mode 100644 index 6ee500d..0000000 --- a/docs/chatbot-management/broadcast.md +++ /dev/null @@ -1,110 +0,0 @@ ---- -id: broadcast -title: Broadcast ---- - --------------------- - -Automating bulk messaging is a widespread use case when communicating with a big audience. You may want to notify **all** chatbot users of an upcoming event. Sending a message from the HITL interface of your Botpress installation will likely be a lengthy, error-prone process. To help you out, we have created a broadcast module that takes care of this process. Let's take a closer look at this module. - -![Broadcasting Module Interface](/assets/broadcast.png) - -## Creating a Broadcast - -To create a broadcast, click the **+ New Broadcast** button in the top right corner of the module UI. Botpress will present you with a window like the one below: - -![New Broadcast](/assets/new-broadcast.png) - -### Content - -This button allows you to pick content. Once you click it, you can either create a new content element or select an existing one. This is the content that Botpress will send to chatbot users during the broadcast. - -### Date - -This is the date when that you will send the broadcast. You can schedule the broadcast for transmission on any future date. - -### Time - -This is the time when your chatbot sends the broadcast. You can schedule the broadcast to be sent at any future time. If no timezone information is available for the user, the default time will be in the GMT zone. - -### Filtering - -You can apply filters to the broadcasts. Filters are small JavaScript functions that your chatbot will evaluate before sending the broadcast to a user. Botpress calls this condition for every user scheduled to receive the broadcast. You can add multiple filter functions, and a user will be filtered out if at least one of them returns false. - -#### Variables Exposed to the Filter Function - -- `bp`: botpress instance; -- `userId`: the userId to send the message to; -- `channel`: the channel on which the user is on. - -The function needs to return a boolean or a Promise of a boolean. - -:::note -Starting your function with return is optional. -::: - -#### Examples - -Send a message only to users on Facebook: - -```js -channel === 'facebook' -``` - -Use the Botpress SDK to check the kvs: - -```js -bp.kvs.forBot('botName').get('keyName') === 'keyValue' -``` - -## Broadcast API - -The broadcast API allows you to create and manage broadcasts without using the broadcast interface in Botpress Studio. The following API calls are available: - -### Upcoming Broadcasts - -You can get a list of scheduled broadcasts by sending a GET HTTP call. This command returns all the upcoming broadcasts: - -```js -GET /mod/broadcast/broadcasts -``` - -### Scheduling with API - -You can schedule a new broadcast by sending a PUT HTTP call to the broadcast module API route: - -```js -PUT /mod/broadcast/broadcasts -``` - -### Body - -Below is the schema of an HTTP call body: - -```js -{ - botId: string, // *required* - date: string, // *required*, 'YYYY-MM-DD' - time: string, // *required*, 'HH:mm' - timezone: null|int, // null (users timezone), or integer (absolute timezone) - type: string, // *required*, 'text' or 'javascript' - content: string // *required*, the text to be sent or the JavaScript code to execute, - filters: [string] // filtering conditions, JavaScript code -} -``` - -### Updating an Existing Broadcast - -The call for this operation is the same as scheduling, except that `id` is also necessary. You can't modify a processing broadcast. - -```js -POST /mod/broadcast/broadcasts -``` - -### Delete a Broadcast - -You can delete an existing broadcast using the delete HTTP call. You can't delete a processing broadcast. - -```js -DELETE /mod/broadcast/broadcasts/:id -``` diff --git a/docs/chatbot-management/language-understanding/language-understanding.md b/docs/chatbot-management/language-understanding/language-understanding.md deleted file mode 100644 index 5ed9183..0000000 --- a/docs/chatbot-management/language-understanding/language-understanding.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: language-understanding -title: Language Understanding ---- - --------------------- - -Natural Language Understanding (NLU) is a branch of artificial intelligence where computer understands and processes the content gathered from a user. In fact, it transforms a natural dialog into structured information that your chatbot can understand and use to return the best answer possible. - -The information generated by NLU tasks is added to the message metadata directly (under `event.nlu`), ready to be used by other modules and components. - -:::note -If you want your bot to understand a question and provide an answer automatically, you should do it in the Q&A module instead. -::: - -**Advantages:** -- fast speed (both at training and evaluation time); -- tight security (doesn't relay messages to external services); -- predictable (unit tests, and the model resides on your computer or server); -- free! - -![nlu-overview](/assets/nlu-overview.png) - -## Intent Classification - -It’s about recognizing what the user is saying and training the chatbot to understand it. Way more accurate than only using keywords! - -## Entity Extraction - -Entity extraction involves extracting and normalizing structured information from messages such as dates, time, cities, names, and many more. We generally define entities in the form of patterns or lists. - -## Slot Tagging - -Slot tagging is needed to identify the necessary parameters to fulfill a given task. Slots are necessary **parameters** to complete the action associated to an intent. - -## Language Server - -The language server provides additional information about words. You don't have to teach your chatbot to understand synonyms. - -By default, your Botpress server queries one of our language servers, but you can host your server to keep it your premises. - -## External NLU Providers - -If you want to use an external provider for some reason, you can do so by using hooks and calling the external NLU provider via API. - -:::note -We don't support two-way synchronization [(see why)](https://github.com/botpress/botpress/pull/1170). You'll have to maintain this yourself. -::: \ No newline at end of file diff --git a/docs/chatbot-management/language-understanding/misunderstood.md b/docs/chatbot-management/language-understanding/misunderstood.md deleted file mode 100644 index 0df3dc0..0000000 --- a/docs/chatbot-management/language-understanding/misunderstood.md +++ /dev/null @@ -1,175 +0,0 @@ ---- -id: misunderstood -title: Misunderstood ---- - --------------------- - -## Misunderstood Module - -Botpress ships with a **Misunderstood** module that helps you deal with user questions that the NLU engine did not match to any existing QnA's. - -This module allows you to: - -- View all phrases from the user which your chatbot didn't understand; -- Assign them to a QnA or a workflow. - -![The Misunderstood Interface](/assets/misundertood-interface.png) - -### Requirements - -Activate the module in `.../data/global/botpress.config.json` or from the admin interface, in the Config. - -### Misunderstood Tab - -The **Misunderstood** tab contains all user questions to which the chatbot could not find a response from the QnA module's question set. Of course, the answer may already be in this body of solutions. If the calculated confidence level is too low for election, a user's question will end up being _misunderstood_ and will appear in this interface. - -The **Misunderstood** tab has the following filters: - -- **New:** misunderstood questions not yet inspected; -- **Pending:** questions been classified as requiring investigation; -- **Done:** misunderstood questions inspected and classified; -- **Ignored:**phrases that were later handled by another process in the event engine. An example is keywords. - -### QnA Thumbs Down Tab - -This tab is a replica of the **Misunderstood** tab. The only difference is that this tab captures answers from the QnA module, which the chatbot user rated with a thumbs-down. Your chatbot user rates this answer using two icons that appear at the bottom left of the message bubble containing a response from the QnA Module. - -### Rectifying Misunderstood / Thumbs Down - -The Misunderstood module provides tools to help you train your chatbot to understand questions flagged as unknown. You can do this in the **New Misunderstood** pane, which is in the middle of the interface. In addition, there are three buttons labeled **Ignore**, **Skip**, and **Ammend**. - -![The Misunderstood Interface](/assets/mis-interface-new-item.png) - -#### Ignore - -If you choose this option, a misunderstood phrase will be ignored, which is helpful for keywords that have been captured in the misunderstood module or for users who enter profane language or gibberish. - -#### Skip - -These are phrases that you may want to investigate further before deciding how you can handle them. Examples are phrases that may require expert knowledge to craft answers. Another collaborator can then go through these phrases, providing solutions and redirects. - -#### Amend - -The **Ammend** button lets you assign the misunderstood phrase to either an **Intent** or a **QnA**. There is a search capability for both of these. If you make a mistake when assigning, you can always use the undo button and assign again. - -![The Misunderstood Interface](/assets/mis-solve-ammend.png) - -:::note -Currently, you cannot create a new QnA or a new intent from the **Misunderstood** module. Therefore, when the need arises, go to the module interface for either **QnA** or **Natural Language Understanding** and create then return to the **Misunderstood** module and classify them. -::: - -## NLU Dataset Guideline - -### Number of Utterances - -The NLU engine uses utterances to train your chatbot. Generally speaking, the more utterances, the better because AI models perform better predictions when they have a vast training body. The recommendation is: -- Per Intent: 10 to 20, plus 5 to 10 for every slot -- Per QNA: 10 to 20 - -### Avoid Duplication - -Duplication when creating NLU datasets will result in redundant or useless data which the engine does not process. Below are forms of repetition you should always avoid. - -#### Within the Same Intent/QNA and Across Intents/QNAs - -No training phrase should ever be duplicated. When you repeat training phrases, your chatbot will fail to train, and you will not be able to import that dataset to another chatbot. - -#### Singular/Plural Duplication - -Example: `Show bookmark` and `Show bookmarks` - -We suggest that you use the singular and plural form in different phrases: - -`Show bookmark` and `I want to see my bookmarks` - -#### Close Duplicates - -When you try to add a variation, it is essential to add a different phrase instead of just adding a pronoun. - -Example: `Show favorites` and `Show my favorites` - -### Avoid Spelling and Grammar Mistakes - -The NLU engine performs spellcheck on _the phrase written by a user during a conversation, not on your training dataset_. For matches to be close, your spelling and grammar should be impeccable. Take time to run spellcheck on your NLU training dataset. - -### Mix Utterances - -- Mix natural language utterances with keyword-only utterances as well as natural language + fluff (long phrases) utterances: - -Example: `Reset password` and `I want to reset my password` and `Can you please help me to reset my password for my emails` - -- Mix utterances by using synonyms: - -Example: `hobby`, `leisure activities`, `free time` - -- Mix abbreviations with written-out concepts in utterances: - -Example: `I have a problem with a PO` and `Purchase order issue` - -- Case sensitivity: Text is converted to lowercase for intent matching - -- Add different sentence structures - -Example: - `See notifications` - `How can I view my reminders` - `Look at my notifications list` - `Reminder summary` - `I want to see my scheduled notifications.` - `Give a list of all my notifications` - `View all reminders` - `Where can I find reminders` - -### Stick to One Concept per Intent/QNA - -Avoid having multiple concepts for one intent. - -## When to Use an Intent vs. QNA - -### Intent - -- When extracting information from the user input (such as dates and times);. -- When a workflow needs to start (such as raise a ticket for a machine failure). - -### QNA - -For straight forward Question and Answers. - -## Influence of Punctuation - -- The NLU engine ignores punctuation (except hyphens) when classifying text. -- Punctuation is considered when working with entities and slots. -- Hyphenated words are joined as a single token. - -## Bot Improvement Module - -Botpress provides a way for you to check if your QnA module's AI is performing well. You can do this by using the Bot Improvement module. This module lets the chatbot user rate responses from the chatbot using a simple thumbs-up/thumbs-down scale. These appear as two icons at the bottom left of the message bubble containing an answer from the QnA Module. - -![Thumb Icons](/assets/b-i-chat.png) - -### Module Interface - -The bot improvement interface contains all the QnA items, which the user rated with a thumbs-down. These appear in the **Feedback Items** section. For context, a preview of the conversation is displayed when you select a feedback item. - -![Graphical User Interface](/assets/b-i-interface.png) - -### Pending - -These are negative feedback items that an assigned collaborator has not yet inspected. Each feedback item has the following information attached. - -#### Details - -These are the message details, limited to the `event id` and message `timestamp`. - -#### Detected Intent - -A detected intent is the QnA entry that your chatbot elected as the best-fit answer to the users' questions. The intent type can either be a **Q&A** or a **Workflow** - -### Solved - -These are negative feedback items that an assigned collaborator has not yet inspected. - -### Conversation Preview - -For context, the bot improvement module gives a preview of the conversation. It highlights the message responded to by the chatbot, allowing a collaborator to quickly identify why a user decided to rate the response with a thumbs-down. \ No newline at end of file diff --git a/docs/enterprise/advanced-chatbots/multi-lingual-chatbots/switching-languages.md b/docs/enterprise/advanced-chatbots/multi-lingual-chatbots/switching-languages.md deleted file mode 100644 index 1dde9c5..0000000 --- a/docs/enterprise/advanced-chatbots/multi-lingual-chatbots/switching-languages.md +++ /dev/null @@ -1,36 +0,0 @@ ---- -id: switching-languages -title: Switching Languages ---- - ---- - -Switching languages in your Botpress instance is very easy. - -:::note -Don't forget to take a look at the [supported languages](/building-chatbots/language-understanding/supported-languages). -::: - -## Switch Language - -1. At the bottom right, next to the name of your bot, click the language flag. -2. Select the desired language. - -You'll see a `missing translation` notification on your content. - -## Translate Your Content - -1. Click the **Flow** tab. -1. Find the node that you want to translate. -1. Edit the text in the **Inspector**. - :::tip - You can click the info button ![info-button](/assets/info-button.png) and it pastes the message in the default language. - ::: -1. Write a translation (where your text is red with **(missing translation)** next to it). - -You can now manage your content. - -:::info -You can't create the original content in another language than the default one. You will have this message displayed: -![translation](/assets/translation.png) -::: diff --git a/docs/enterprise/licensing/enterprise-licensing.md b/docs/enterprise/licensing/enterprise-licensing.md deleted file mode 100644 index 3a92584..0000000 --- a/docs/enterprise/licensing/enterprise-licensing.md +++ /dev/null @@ -1,56 +0,0 @@ ---- -id: enterprise-licensing -title: Enterprise Licensing ---- - --------------------- - -The server license tab is meant to be used when you want to have a enterprise environment. This enables a lot of new [options and features(/overview/features/enterprise-specific-features)]. Don't forget that you also have all the other features of the free edition. - -## Obtain a License - -Please contact our sales team using the request demo form on our [website](https://botpress.com/request-demo). - -:::info -When giving us you URL information to get your license key, don't forget that it must be the exact URL, or it won't work. -::: - -## Add an Enterprise License - -1. In your Admin Dashboard, go to the **Server License** tab. -1. Click **Enable Pro & Reboot Server**. -1. Click **Enable** in the dialog box. - ...Wait for the server to reboot... -1. Click **Enter license key**. -1. Paste the license key that you were given. -1. Click **Validate**. - -This will let you do everything that is cautioned as Enterprise Only. - -## Activate Your License - -When starting Botpress, use the `BP_LICENSE_KEY=` environment variable as well as the `EXTERNAL_URL=` environment variable. - -**Binary** - -```bash -BP_LICENSE_KEY= EXTERNAL_URL= ./bp -``` - -**Docker** - -```bash -docker run -d \ ---name botpress \ --p 3000:3000 \ --v botpress_data:/botpress/data \ --e BP_LICENSE_KEY= \ --e EXTERNAL_URL= \ -botpress/server:$TAG -``` - -## License Breach and Details - -If you happen to breach your license (e.g you try to add more nodes than allowed on your license), your bots won't work anymore until you either update your license or get back to an unbreached license state. - -If you don't remember the limits of your currently activated license, you can always go to the **Server Settings** page in your user top right menu. There you'll have all information on your current license. \ No newline at end of file diff --git a/docs/enterprise/server-and-cicd-management/alerting.md b/docs/enterprise/server-and-cicd-management/alerting.md deleted file mode 100644 index 3dc6f0e..0000000 --- a/docs/enterprise/server-and-cicd-management/alerting.md +++ /dev/null @@ -1,141 +0,0 @@ ---- -id: alerting -title: Alerting ---- - --------------------- - -The alerting service will trigger an alarm when your configured threshold are exceeded. - -### Prerequisite - -- Botpress Pro must be enabled with a valid license key; -- Redis Server must be running (minimum: version 2.8); -- Monitoring must be enabled. - -### Quick Start - -1. Edit `botpress.config.json` and set `pro.alerting.enabled` to `true`. -2. Add at least one Incident Rule (more on that below) in `pro.alerting.rules`. -3. Restart Botpress. -![Alerting Interface](/assets/alerting.png) - -### Incident Rules - -This is where you will define your thresholds. - -Let's see an example of a rule, then we will break it apart: - -```js -{ - "name": " High CPU Usage ", - "field": "cpu.usage", - "aggregation": "avg", - "operand": "equalOrMoreThan", - "value": 60, - "timeframe": "2m", - "cooldown": "1m" -} -``` - -This rule can be read like this: - -- Raise an alarm if the `average` value of `cpu.usage` is `equal or more than` `60` for `2 minutes`. -- When the incident is resolved, `wait at least one minute` before triggering another alert for the same reason - -We use a simple "rolling window" method to calculate results. If your timeframe is 2 minutes and you collect data each 10 seconds, then there will be 12 different "ticks" that will be evaluated each 10 seconds with your chosen aggregation. The value is then compared with your configured threshold. - -#### Fields - -| Field | Description | -| -------------------- | ---------------------------------------------------------------- | -| `cpu.usage` | Average % of CPU usage | -| `mem.usage` | Average % of Memory usage | -| `mem.free` | Amount of free memory (in KB) | -| `requests.count` | Number of HTTP requests processed | -| `requests.latency_avg` | Average latency of HTTP requests | -| `requests.latency_sum` | The sum of the latency of all HTTP requests | -| `eventsIn.count` | Number of incoming events (when users sends messages to the bot) | -| `eventsOut.count` | Number of outgoing events (anything the bot sends back to users) | -| `warnings.count` | Number of warnings | -| `errors.count` | Number of errors | - -#### Aggregation - -- `avg`: Average -- `sum`: Sum -- `min`: Minimum -- `max`: Maximum -- `last`: The last value received from the monitoring service -- `count`: The number of "ticks" in the timeframe - -#### Operands - -- `equalOrLessThan`: Equal or less than =< -- `equalOrMoreThan`: Equal or more than => - -#### Cooldown - -When an incident is resolved, no other incident of the same nature (same name / same host) will be opened until this delay expires. - -### Incident & Hook - -Now that you have some incident rules, how do you get alerted when something happens? This is where hooks comes in handy. Every time an incident is opened or resolved, Botpress will call the hook `on_incident_status_changed` with the incident as an object. When the property `endTime` is not defined, it means that the incident was opened. When it is set, the incident is resolved. - -Here's an example of `data/global/hooks/on_incident_status_changed/alert.js` - -```js -async function alertChanged() { - if (!incident.endTime) { - console.log('HOOK: Incident Opened:', incident) - } else { - console.log('HOOK: Incident Closed:', incident) - } - - // Here you could send a SMS, an E-mail, etc... - // await axios.post.... -} - -return alertChanged() -``` - -The incident object has these properties: - -```js -{ - id: 'A unique ID randomly generated', - ruleName: 'The name of your incident rule', - hostName: 'The host name which hosts the Botpress instance', - startTime: 'Date when the incident was opened', - endTime: 'When the incident was resolved', - triggerValue: 'The value that triggered the incident' -} -``` - -#### Other Rules Examples - -Raise an incident when there is more than 10 errors in the last minute - -```js -{ - "name": "High number of errors", - "field": "errors.count", - "aggregation": "sum", - "operand": "equalOrMoreThan", - "value": 10, - "timeframe": "1m" -} -``` - -No incoming events for the past 10 minutes - -```js -{ - "name": "No more incoming events", - "field": "eventsIn.count", - "aggregation": "sum", - "operand": "equalOrLessThan", - "value": 0, - "timeframe": "10m" -}, -``` diff --git a/docs/enterprise/server-and-cicd-management/monitoring.md b/docs/enterprise/server-and-cicd-management/monitoring.md deleted file mode 100644 index 7a3d91e..0000000 --- a/docs/enterprise/server-and-cicd-management/monitoring.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -id: monitoring -title: Monitoring ---- - --------------------- - -Monitoring is an essential part of any software deployment. Botpress includes, out of the box, a simple but intuitive dashboard -designed to keep an eye on your servers. Key metrics are collected (like CPU and Memory usage), including a couple of botpress-related metrics. - -Metric data is collected and stored using a Redis server. - -This feature is only available to users of the Pro version. - -### Prerequisite - -- Botpress Pro must be enabled with a valid license key; -- Redis Server must be running (minimum: version 2.8). - -### Quick Start - -1. Open your `botpress.config.json` file and set `pro.monitoring.enabled` to `true`. -2. Set an environment variable named `CLUSTER_ENABLED` to `true`. -3. Set another environment variable named `REDIS_URL` which should point to your server (example provided below). -4. Start your Botpress Server. -![Monitoring Interface](/assets/monitoring.png) - -### Configuration - -The default values should be good for most situations. They are described in details directly in the [Botpress Config Definition](https://github.com/botpress/botpress/blob/master/src/bp/core/config/botpress.config.ts) - -#### Redis Configuration - -The environment variable `REDIS_URL` must be constructed like this: `redis://user:pass@hostname:port` -If you start it locally, this should do the trick: `REDIS_URL=redis://localhost:6379` - -### Metrics - -These metrics are collected for every node of your Botpress Cluster. - -- Average % of CPU usage -- Average % of Memory usage -- Number of HTTP requests processed -- Number of incoming events (when users sends messages to the bot) -- Number of outgoing events (anything the bot sends back to users) -- Number of warnings -- Number of errors -- Latency of HTTP requests \ No newline at end of file diff --git a/docs/enterprise/server-and-cicd-management/pipelines/configure-pipeline.md b/docs/enterprise/server-and-cicd-management/pipelines/configure-pipeline.md deleted file mode 100644 index 3e835d9..0000000 --- a/docs/enterprise/server-and-cicd-management/pipelines/configure-pipeline.md +++ /dev/null @@ -1,114 +0,0 @@ ---- -id: configure-pipeline -title: Configure Pipeline ---- - --------------------- - -## Git Syncing – Source Control Management - -A best practice is to keep track of changes to your chatbot using your preferred [Source Control Management Tool (SCM)](https://www.softwaretestinghelp.com/version-control-software/) and always deploy the master branch in production. Once deployed, you can regularly pull changes and update them to your SCM or revert to them when the need arises. Doing so helps you harness your SCM power for branches, merging conflicting files, reviewing changes, and creating revisions. - -Let's suppose that you have a more complex deployment pipeline with one or multiple staging environment(s) with pending changes on each environment. In that case, you can easily track and work on them using development pipelines. - -### Setting up Botpress Git Syncing (with GitHub) - -1. [Download Botpress](https://botpress.com/download). -2. Open your terminal. -1. Type `cd [PATH]/botpress-[VERSION]`. -3. Set up GitHub remote tracking: -``` -git init -git add README.md -git commit -m "first commit" -git branch -M main -git remote add origin git@github.com:[GH_USERNAME]/bp-project.git -git push -u origin main -``` -4. You can add a develop and staging branch to fit your workflow, if needed. -5. Everytime you make a change in the Conversation Studio or in your preferred code editor, you can commit that change to track changes. -6. When you are ready to send you chatbot to production, you can type `git merge` in your terminal. -7. Then, you type `checkout master` in your terminal and you go to your Botpress Admin to export your chatbot. -8. You upload it on your production environment (usually cloud deployment). - -### Syncing Changes Between Environments - -We will use Git to sync changes between 2 environments and promote an environment (i.e., promote staging to production). - -Let's assume that given a pipeline with three environments (**development**, **staging**, and **production**), there are some changes both on production and staging, and you want to promote staging to production. What you want to do is the following: - -1. Merge production into staging which might result in a merge conflict. -2. Resolve conflicts using any merge conflict tool (such as VSCode, Sublime Merge). -3. Push the results to master so they are deployed to your production environment. - -First, create a branch and sync it with the production environment: - -``` -git checkout master && git checkout -b prod-sync -./bp pull --url {PROD_SERVER_URL} --authToken {YOUR_AUTH_TOKEN} --targetDir {TARGET_DIRECTORY} -git commit -am 'sync prod' -``` - -Repeat the process with staging environment: - -``` -git checkout master && git checkout -b staging-sync -./bp pull --url {STAGING_SERVER_URL} --authToken {YOUR_AUTH_TOKEN} --targetDir {TARGET_DIRECTORY} -git commit -am 'sync staging' -``` - -Then merge the staging changes into the prod changes: - -`git checkout prod-sync && git merge staging-sync` - -This will create a merge conflict. Use your preferred merge tool to review the changes and resolve the conflicts. Once done, you can publish your branch and create a pull request (if your hosted git allows it), and merge it to master. - -Once your master branch is up-to-date, you'll be able to push versions the changes to production with: - -`./bp push --url {PROD_SERVER_URL} --authToken {YOUR_AUTH_TOKEN} --targetDir {TARGET_DIRECTORY}` - -With these quick tips, you can now promote any environment changes to any stage in your deployment pipeline. - -### CLI Commands - -To address this issue, we added commands to the CLI. In production, your changes are saved to the database which is persisted between deployments. Botpress CLI gives you two commands: `bp pull` to pull pending changes on your server for all your bots and server-wide files and `bp push` to push your local changes to your server. - -You can also head to the **Versioning** tab of your Botpress Admin at https://your.bp.ai/admin/server/version, and Botpress will accurately format the command for you (including your token) for any changes that have been made. Just paste it to your shell, and Botpress will extract the changes in the provided target directory. A successful output should look like the following: - -![versioning pull](/assets/versioning-pull.png) - -Notice that without any changes, you will see a **You're all set!** message. - -:::note -The `BPFS_STORAGE` environment variable must be set to `database` to enable **pushing** to this node. -::: - -Please note that `targetDir` and `sourceDir` uses relative paths. - -#### Pull - -**Binary:** - -```bash -./bp pull --url --token --targetDir -``` - -**Docker:** - -```bash -docker exec -it bash -c "./bp pull --url --token --targetDir " -``` - -#### Push - -**Binary:** - -```bash -./bp push --url --token --sourceDir -``` - -**Docker:** - -```bash -docker exec -it bash -c "./bp push --url --token --sourceDir " -``` diff --git a/docs/enterprise/server-and-cicd-management/production-checklist.md b/docs/enterprise/server-and-cicd-management/production-checklist.md deleted file mode 100644 index bfc0f60..0000000 --- a/docs/enterprise/server-and-cicd-management/production-checklist.md +++ /dev/null @@ -1,167 +0,0 @@ ---- -id: production-checklist -title: Production Checklist ---- - --------------------- - -This enterprise feature helps you visualize what you need to do before going to production. It lists all the important steps to do: - -:::tip Best Practice -Once your server is correctly setup, we recommend disabling this page by setting the environment variable BP_DISABLE_SERVER_CONFIG to true. -::: - -## Enable Botpress Professional - -The section about [enterprise licensing](/enterprise/licensing/enterprise-licensing) shows you how to obtain, add, and activate your license. Remember that the Botpress Professional version comes with a lot of [enterprise-specific features](/overview/features#enterprise-specific-features). - -**Environment variables:** -- `BP_CONFIG_PRO_ENABLED` -- `BP_CONFIG_PRO_LICENSEKEY` - -**Values in the botpress.config.json file:** -- `pro.enabled` -- `pro.licenseKey` - -## Use a Postgre database - -You should use a [Postgres database instead of a SQlite database](/building-chatbots/developers/database#how-to-switch-from-sqlite-to-postgressql). Postgres is more resilient and allows to run Botpress in [cluster mode](/going-to-production/deploy/enterprise-scaling) (using multiple servers). - -**Environment variable:** -- `DATABASE_URL` - -## Use the database BPFS storage - -When you [set this option](/building-chatbots/language-understanding/hosting), all your bots and configuration files are stored in the database. Only those can be edited while making changes using the interface. -Multiple servers can then synchronously access the same latest data. - -**Environment variable:** -- `BPFS_STORAGE` - -## Run Botpress in production mode - -When you run Botpress in production, these changes happen: - -- Stack traces when error occurs are hidden. -- Debug logs and logging of standard errors to optimize speed are hidden. -- Some validations for speed are optimized. -- Using multiple servers (cluster mode) is enabled. - -**Environment variable:** -- `BP_PRODUCTION` - -## Configure the external server URL - -Using an external server URL may cause multiple issues in production, like resources not displaying correctly or links not working. - -:::note Notes -- By default, Botpress starts an [HTTP server on localhost, listening to port 3000](/going-to-production/deploy/#http-server-configuration). -- When using Botpress Professional, this value is also used to validate your license. -::: - -**Environment variable:** -- `EXTERNAL_URL` - -**Value in the botpress.config.json file:** -- `httpServer.externalUrl` - -## Enable Redis support - -Redis allows you to run multiple Botpress servers using the same data. Only `REDIS_URL` and `CLUSTER_ENABLED` are required. Simply use the same URL for Redis and set the `BP_REDIS_SCOPE` environment variable to `prod` on your production environment and `staging` on your staging environment. - -**Environment variables:** -- `REDIS_URL` -- `CLUSTER_ENABLED` -- `BP_REDIS_SCOPE` - -## Restrict CORS to your own domain - -You can either disable CORS completely (set to `false`), or set an allowed origin. - -:::info -By default, Botpress allows any origin to reach the server. -::: - -**Values in the botpress.config.json file:** -- `httpServer.cors.enabled` -- `httpServer.cors.origin` - -## Enable Cookie storage for the JWT token - -Storing the token in cookies adds an additional layer of security for the user's session. - -:::info -You must configure the CORS policy before. -::: - -**Values in the botpress.config.json file:** -- `jwtToken.useCookieStorage` -- `jwtToken.cookieOptions` -- `httpServer.cors.credentials` - -## Host your own language server - -The [default language server](/building-chatbots/language-understanding/hosting#language-server) configured with Botpress is a public server with request limitations. - -**Value in the botpress.config.json file:** -- `nlu.json: languageSources` - -## Securing your server with HTTPS - -Botpress doesn't handle certificates and HTTPS headers directly. You should instead use a [NGINX](/building-chatbots/language-understanding/hosting) server. - -## Enable audit trail - -You should enable a special [debug scope](/going-to-production/deploy/#advanced-logging). It tracks every sent requests with their user or IP address and save them to a log file. - -## Enable Sticky Sessions - -When using polling as a primary or secondary socket transport, you must enable sticky sessions. If you decide to use Websocket as the only transport, you don't need to enable sticky sessions. - -See this documentation for more details: https://socket.io/docs/v4/using-multiple-nodes/#why-is-sticky-session-required. - -**Value in the botpress.config.json file:** -- `httpServer.socketTransport` - -## Output logs to the filesystem - -By default, Botpress does some minimal [logging](/going-to-production/deploy/#logs-configuration) to the database. - -:::tip Best Practice -You should enable the log output on the file system. -::: - -**Value in the botpress.config.json file:** -- `logs.fileOutput.enabled` - -## Change Botpress base path - -By default, all requests are handled at the top level of the external URL. You can change that path (for example to use http://localhost:3000/botpress) by updating your server's [`EXTERNAL_URL`](/going-to-production/deploy/#going-to-production) and adding the suffix at the end. - -## Create custom roles and review permissions - -There is a default set of [role and permissions](/enterprise/user-management-and-security/role-based-access-control/roles) when you create a workspace. - -:::tip Best Practice -You should review and update them. -::: - -## Enable other authentication mechanism - -The default authentication method is the [basic one](/enterprise/user-management-and-security/authentication-methods/basic-authentication). - -:::note -We currently support [LDAP](/enterprise/user-management-and-security/authentication-methods/ldap), [SAML](/enterprise/user-management-and-security/authentication-methods/saml), and [OAuth2](/enterprise/user-management-and-security/authentication-methods/oauth2). -::: - -## Configure your Reverse Proxy and Load Balancing - -Check the [documentation](/building-chatbots/language-understanding/hosting) for more information - -## Generate a diagnostic report - -This tool will generate a report (`diagnostic.txt`) after testing the connectivity to various components and ensuring that proper folders are writable. It will also include the configuration files. - -:::info -Passwords and secrets will be obfuscated. -::: \ No newline at end of file diff --git a/docs/enterprise/user-management-and-security/authentication-methods/authentication-methods.md b/docs/enterprise/user-management-and-security/authentication-methods/authentication-methods.md deleted file mode 100644 index d8a24a6..0000000 --- a/docs/enterprise/user-management-and-security/authentication-methods/authentication-methods.md +++ /dev/null @@ -1,105 +0,0 @@ ---- -id: authentication-methods -title: Authentication Methods ---- - --------------------- - -There are three different types of authentication: - -1. **Collaborators**: Access the Admin Studio UI to manage and edit chatbots based on their roles. -2. **Chat Users**: Can speak to chatbots listed in the Admin UI. -3. **External Users**: The developer handles user authentication by providing a JWT token to identify the user. - -## Authentication Overview -Four authentication strategies are available, namely, Basic, SAML, OAuth2, and LDAP. You can implement these multiple times (for example, you could have two different OAuth2 configurations for different workspaces). -![Authentication Methods](/assets/auth-methods.png) -Regardless of which authentication strategy you use, they are all stored in the database. When you add a new strategy in the `botpress.config.json` and restart your application, Botpress will create a new table called `strategy_STRATEGYID`. - -Each time you grant access to a user for a specific workspace, an entry is created in the table `workspace_users` with his role. - -Chatbots with more than one authentication strategy will exhibit a menu from which you can pick a strategy. You can skip the menu and bookmark a specific strategy by changing the page URL: `/admin/login/STRATEGYID`. - -Moreover, you can access a specific workspace by using `/admin/login?workspaceId=WORKSPACEID` - -You can find the definition for the various authentication strategies [here](https://github.com/botpress/botpress/blob/master/packages/bp/src/core/config/botpress.config.ts#L326). - -## User Authentication - -Using External Authentication, it is possible to authenticate a user on your system, then validate his identity each time he sends a message to the bot. That information can be used in Actions, Hooks, and Transitions on the Flow Editor. - -Here's a summary of the process: - -1. User authenticate on your platform -2. Your platform returns a JWT token to the user and configure the webchat -3. The token is sent to Botpress every time a message is sent -4. Botpress validates the token, decrypt the content, and makes it available through `event.credentials` - -### Prerequisite - -- A backend that will authenticate the user and generate the JWT token -- The public key used by the backend - -### Quick Start - -1. Edit `data/global/botpress.config.json` and set `pro.externalAuth.enabled` to `true` -2. Configure the other variables for the JWT token (issuer, audience, algorithm, publicKey) -3. Restart Botpress -4. Edit the code of the embedded web chat to send the generated JWT token -5. Enjoy! - -Here is an example configuration, [check the complete configuration for more details](https://github.com/botpress/botpress/blob/master/packages/bp/src/core/config/botpress.config.ts) - -```js -"externalAuth": { - "enabled": true, - "audience": "users", - "issuer": "botpress", - "algorithm": "HS256" - "publicKey": "MIIDETCCAfmgAwIBAgIJIHQ75dJxjRuEMA0GCSqGSIb3DQEBCwUAMCYxJDAiBgNVBAMTG2JvdHByZXNzLXNhbWwtaWRwLmF1dGgwLmNvbTAeFw0xOTAxMTUxNTAzMDFaFw0zMjA5MjMxNTAzMDFaMCYxJDAiBgNVBAMTG2JvdHByZXNzLXNhbWwtaWRwLmF1dGgwLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMUHXzCG3c4iSyU1N1Nzu8LsEIQ8tj5SHG+VtHrhWyfdckq5nP2wy/u6Tt20pdOx+4zu1718x2xVPMwFN9M2uUSJaY6vIXfHofKyn1htuYYzOklLZmnrLX4Pm7YHE2SubAsuwg6e7/sgIZ06T", - } -} -``` - -### How to configure the Public Key - -Botpress can add the public key directly in the `botpress.config.json` file (on the same line). If you prefer to add the key in a file, remove the property `certificate`, and Botpress will load the key from `data/global/end_users_auth.pub` - -### How to create a new Key Pair - -The certificate must be in the PEM format. You can use the below commands to generate one. - -```bash -ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key -openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub -cat jwtRS256.key // Your private key -cat jwtRS256.key.pub // Your public key -``` - -### Authenticate the user - -Once you have generated the JWT token, Botpress must pass it down to the webchat. It will then be sent to Botpress with every message and event. There are two different situations: - -1. The user is authenticated before the webchat is loaded. - -Simply add the external token as an option to the `init` method: - -```js -window.botpressWebChat.init({ - host: 'http://localhost:3000', - botId: botId, - externalAuthToken: 'my.jwt.token' -}) -``` - -2. The user is already discussing with the bot, then he is authenticated - -Use the `configure` method to change the option: - -```js -window.botpressWebChat.configure({ externalAuthToken: 'my.jwt.token' }) -``` - -### How to use the authenticated payload - -When a user is authenticated, the JWT token is automatically decoded. If the token is valid, all the data it contains will be available through the `event.credentials` property. This can be accessed inside Hooks and while using Actions. diff --git a/docs/enterprise/user-management-and-security/authentication-methods/basic-authentication.md b/docs/enterprise/user-management-and-security/authentication-methods/basic-authentication.md deleted file mode 100644 index c118d5f..0000000 --- a/docs/enterprise/user-management-and-security/authentication-methods/basic-authentication.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -id: basic-authentication -title: Basic Authentication ---- - --------------------- - -Basic Authentication allows a user to log in with a simple username/password. The password is salted for added security. - -To create more accounts, visit the `Collaborators` tab on the Admin UI. Choose the role and enter the email of your collaborator, then you will receive a random password. The user will change this password after the first login. - -Super Admins can reset the password of any user from the Action menu in the collaborators' interface. -![RBAC](/assets/password-change.png) - -## Configuration Example - -In your `botpress.config.json` file: - -```js -{ - "pro": { - "collaboratorsAuthStrategies": ["default"], - }, - "authStrategies": { - "default": { - "type": "basic", - "label": "Default Auth", - "options": {} - } - } -} -``` - -### Additional Security -You can configure additional options when using this authentication strategy. Please refer to the [configuration file for more information](https://github.com/botpress/botpress/blob/master/packages/bp/src/core/config/botpress.config.ts#L350) : - -- `maxLoginAttempt`: Maximum number of tries allowed before locking out the user. -- `lockoutDuration`: Account will be disabled for this amount of time when a user reaches the `maxLoginAttempt`. -- `passwordExpiryDelay`: Password will expire after this time lapses. -- `passwordMinLength`: Minimum length for the user's password. -- `requireComplexPassword`: Requires at least one character of 3 categories of characters. - -### Forgot your password? -Only the first user is allowed to register a new account. If you forgot your password and can't access your account, you will need to clear the list of users, and then you will be able to re-create your account. However, if you have already created other users with an administrator role, they can reset your password for you. - -You can clear the list of users by emptying (or deleting) the table `strategy_default` (if you are using the default strategy) \ No newline at end of file diff --git a/docs/enterprise/user-management-and-security/authentication-methods/ldap.md b/docs/enterprise/user-management-and-security/authentication-methods/ldap.md deleted file mode 100644 index 45c507d..0000000 --- a/docs/enterprise/user-management-and-security/authentication-methods/ldap.md +++ /dev/null @@ -1,34 +0,0 @@ ---- -id: ldap -title: LDAP ---- - --------------------- - -## Prerequisite - -- Botpress Pro enabled with a valid license key -- Information to access the LDAP server - -## Quick Start - -1. Open `botpress.config.json` and set `pro.auth.strategy = 'ldap'` -2. Configure the available options: [check the full configuration for more details](https://github.com/botpress/botpress/blob/master/packages/bp/src/core/config/botpress.config.ts) - -## Field Mapping - -The `fieldMapping` configuration allows you to match the existing properties of your users with the one Botpress uses. You can define these fields for users: `email`, either `fullname` or `firstname` with `lastname`, `company`, `role`, and `location`. - -Whenever a user successfully logs on using SAML or LDAP, Botpress will update his details in his Botpress profile. - -```js -{ - "fieldMapping": { - "email": "emailAddressOnIdp", - "fullname": "userFullName", - "company": "!Botpress", - "role": "userRole", - "location": "officeLocation" - } -} -``` \ No newline at end of file diff --git a/docs/enterprise/user-management-and-security/authentication-methods/oauth2.md b/docs/enterprise/user-management-and-security/authentication-methods/oauth2.md deleted file mode 100644 index 99260d4..0000000 --- a/docs/enterprise/user-management-and-security/authentication-methods/oauth2.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -id: oauth2 -title: OAuth2 ---- - --------------------- - -Some OAuth2 implementations return a JWT token containing all the user's information, while some other returns a unique token, which Botpress must then use to query the user's information. - -```js -{ - "pro": { - "collaboratorsAuthStrategies": ["default"], - }, - "authStrategies": { - "botpress": { - "type": "oauth2", - "options": { - "authorizationURL": "https://example.auth0.com/authorize", - "tokenURL": "https://example.auth0.com/oauth/token", - "clientID": "your-client-id", - "clientSecret": "your-client-secret", - "callbackURL": "http://localhost:3000/api/v1/auth/login-callback/oauth2/botpress", - /** - * If the token doesn't contain user information, set the userInfoURL - */ - "userInfoURL": "https://example.auth0.com/userinfo", - /** - * If the token already includes all user information, - * */ - "jwtToken": { - "audience": "my-audience", - "issuer": "some-issuer", - "algorithms": ["HS256"], - // Either set the certificate, or save it in a file: data/global/oauth2_YOUR_STRATEGY_ID.pub - "publicKey": "" - } - "scope": "openid profile email" - }, - "fieldMapping": { - "email": "email" - } - } - } -} -``` \ No newline at end of file diff --git a/docs/enterprise/user-management-and-security/authentication-methods/saml.md b/docs/enterprise/user-management-and-security/authentication-methods/saml.md deleted file mode 100644 index 62edce8..0000000 --- a/docs/enterprise/user-management-and-security/authentication-methods/saml.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -id: saml -title: SAML ---- - --------------------- - -You can link your SAML Identity Provider seamlessly with Botpress. When it is enabled, Admins will be greeted with a `Sign in with SSO` button on the Admin UI. The first user to ever log in to Botpress using the SSO provider will automatically have an account created and a Super Admin. - -When a user successfully logs on to the Admin UI, Botpress will create an internal account for that user. Botpress will add them to the table `strategy_STRATEGYID` - -There are two possible behaviors. You can either: - -- Allow any user that successfully logs on using your SAML IdP to create an account. Set `allowSelfSignup` to `true` -- Manage users manually (you need to add their emails to the Collaborators page). Set `allowSelfSignup` to `false` - -## Prerequisite - -- Botpress Enterprise enabled with a valid license key -- A SAML IdP (Identity Provider) - -## Quick Start -Let's use SAML to authenticate a user. We will use `jumpcloud`, a popular authentication provider. Head over to the User Authentication menu and select SSO. Select a SAML Identification provider from the ones available on the list or create a new one. For this tutorial, we used Google. Enter the required information, supplying your domain name at all positions marked **YOURDOMAIN** - -After creating your application, you will get the option to download your certificate. Your entry point url will appear next to your application labeled as IdP URL. - -1. Open `botpress.config.json` and set `pro.auth.strategy = 'saml'` -2. Configure the available options. The complete list of SAML options is [available here](https://github.com/bergie/passport-saml). - -Here is a complete example - -```js -"auth": { - "strategy": "saml", - "options": { - "entryPoint": "https://botpress-saml-idp.auth0.com/somestuff/bla", - "callbackUrl": "http://botpress.yourdomain.net/api/v1/auth/login-callback/saml/saml", - "path": "http://botpress.yourdomain.net/api/v1/auth/login-callback/saml/saml", - "issuer": "botpress-saml", - "cert": "MIIDETCCAfmgAwIBAgIJIHQ75dJxjRuEMA0GCSqGSIb3DQEBCwUAMCYxJDAiBgNVBAMTG2JvdHByZXNzLXNhbWwtaWRwLmF1dGgwLmNvbTAeFw0xOTAxMTUxNTAzMDFaFw0zMjA5MjMxNTAzMDFaMCYxJDAiBgNVBAMTG2JvdHByZXNzLXNhbWwtaWRwLmF1dGgwLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMUHXzCG3c4iSyU1N1Nzu8LsEIQ8tj5SHG+VtHrhWyfdckq5nP2wy/u6Tt20pdOx+4zu1718x2xVPMwFN9M2uUSJaY6vIXfHofKyn1htuYYzOklLZmnrLX4Pm7YHE2SubAsuwg6e7/sgIZ06T", - "acceptedClockSkewMs": 5000 - }, - "fieldMapping": { - "email": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress", - "firstname": "cn" - }, - "allowSelfSignup": false -} -``` \ No newline at end of file diff --git a/docs/enterprise/user-management-and-security/role-based-access-control/collaborators.md b/docs/enterprise/user-management-and-security/role-based-access-control/collaborators.md deleted file mode 100644 index 9a16401..0000000 --- a/docs/enterprise/user-management-and-security/role-based-access-control/collaborators.md +++ /dev/null @@ -1,32 +0,0 @@ ---- -id: collaborators -title: Collaborators ---- - --------------------- - -**RBAC** (Role-Based Access Control) allows you to control what your collaborators can access. - -![Add Colloborators](/assets/roles.png) - -:::note -You can change those and create new ones. -::: - -## Assigning a Role to a Collaborator - -1. Access the **Collaborator** tab from the Admin. -1. Click the **Add collaborator**. -1. Specify the collaborator name and their email address. - -![RBAC](/assets/add-role.png) - -After adding a role, Botpress automatically generates a once-off password for the newly created user account. - -![RBAC](/assets/rbac-success.png) - -:::tip -You can also change a collaborator's role by clicking the **Action** button next to the user whose role you wish to change. In addition to the changing roles, the menu allows you to change the password, remove a user from the workspace (Botpress retains the email and password, enabling you to add the user back), or delete the user. - -![RBAC](/assets/change-role.png) -::: \ No newline at end of file diff --git a/docs/enterprise/user-management-and-security/role-based-access-control/roles.md b/docs/enterprise/user-management-and-security/role-based-access-control/roles.md deleted file mode 100644 index 9f9cdc4..0000000 --- a/docs/enterprise/user-management-and-security/role-based-access-control/roles.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -id: roles -title: Roles ---- - --------------------- - -**RBAC** (Role-Based Access Control) allows you to control what your collaborators can access. - -By default, Botpress ships with three roles in addition to the administrator: developer, content editor, and agent. - -![Extra Roles](/assets/rbac-roles.png) - -## Adding a New Role - -In the `/global/workspaces.json` file, you'll find the `roles` property, which is an array of all the roles you can assign to the collaborators on your workspace. You can add, remove, and edit roles by modifying this array directly. - -### Rules - -The rules which govern the users' rights are executed sequentially from first to last. For example, you can assign the following rules: - -1. `+r-w` on `*` -2. `+w` on `bot.content` -3. `-r` on `bot.flows` - -With the rules above, the user will see everything but the flows and won't be able to _change_ anything but content. - -### Operations (op) - -Below are the access levels which Botpress can configure for a user. - -| op | description | -| ----- | ------------ | -| `+r` | Grant read | -| `-r` | Revoke read | -| `+w` | Grant write | -| `-w` | Revoke write | - -### Available Resources (res) - -Below are the resources and interfaces to which you can give your chatbot studio users access. - -| res | description | -| ----------------- | -------------------------------------------- | -| `\_` | \_ | -| `bot.\* ` | All bots inside the workspace | -| `bot.logs ` | The runtime logs | -| `bot.notifications` | Notifications | -| `bot.skills` | The flow skills | -| `bot.media` | File uploads (via the CMS) | -| `bot.content` | The CMS elements (what the bot says) | -| `bot.flows` | The flow editor | -| `bot.information` | Information about the bot | -| `\_` | \_ | -| `admin.\*` | The admin dashboard (/admin) | -| `admin.users ` | Admin collaborators | -| `admin.roles` | Assigning roles ro collaborators | -| `admin.bots` | Creating bots and changing their information | -| `\_` | \_ | -| `module.\*` | Global access to all modules | -| `module.MODULE_ID` | | - -Modules only support a single top-level resource and one operation: `write`. Define as `module.MODULE_ID`, for example, `module.hitl` or `module.code-editor`. - -**Example:** - -```json -{ - "id": "hitl", - "name": "Human in the Loop", - "description": "Can view and respond to users by using the HITL module", - "rules": [ - { - "res": "*", - "op": "+r" - }, - { - "res": "module.hitl", - "op": "+r+w" - } - ] -} -``` diff --git a/docs/enterprise/user-management-and-security/single-sign-on/azure-oauth2.md b/docs/enterprise/user-management-and-security/single-sign-on/azure-oauth2.md deleted file mode 100644 index 9a45b1c..0000000 --- a/docs/enterprise/user-management-and-security/single-sign-on/azure-oauth2.md +++ /dev/null @@ -1,68 +0,0 @@ ---- -id: azure-oauth2 -title: Azure OAuth2 ---- - --------------------- - -:::note -Azure OAuth2 only works for version 12.17.2 and later. -::: - -## Step 1 - Create a Tenant - -Navigate to Azure Active Directory Page in your Azure Portal and create a new tenant. - -## Step 2 - Register an Application - -In the page of your newly created tenant navigate to **App registrations**. - -Create a new application and choose the appropriate configuration for your use case in **Supported account types**, single and multi tenant options are supported, and keep the **Redirect URL** blank for now. - -## Step 3 - Configure Botpress - -In your Botpress instance, navigate to the **Code Editor** in the Conversation Studio of the selected bot(s) and add a new entry within `authStrategies` in the `botpress.config.json` file. You may name the strategy whatever you want (keep the name URL safe) and fill in the entry in the following way: - -```json -"": { - "type": "oauth2", - "allowSelfSignup": false, - "options": { - "authorizationURL": "", - "tokenURL": "", - "clientSecret": "", - "clientID": "", - "callbackURL": "https:///api/v1/auth/login-callback/oauth2/", - "scope": "openid profile email", - "userInfoURL": "https://graph.microsoft.com/oidc/userinfo" - }, - "fieldMapping": { - "email": "email" - } -} -``` - -## Step 4 - Create a Client Secret - -1. Navigate to **Certificates & secrets**. -1. Create a new client secret. -1. Copy its value. -1. Paste it in the `clientSecret` field of your created strategy in the `botpress.config.json` file. - -## Step 5 - Enable the Strategy in Botpress - -Under the **Pro** settings in the `botpress.config.json` file, add your strategy name to the `collaboratorsAuthStrategies` array. - -Also make sure that the `externalAuth` object has `enabled` set to `true`. - -## Step 6 - Configure Callback URL in Azure - -1. In your application in the Azure Active Directory portal, navigate to the **Authentication** page. -1. Add a platform. - 1. Select **Web** for the platform type. - 1. Set your callback url with the one you configured in the `botpress.config.json` file. - 1. For the token type select **ID tokens**. - -## Step 7 - Restart the Botpress Server - -A green cogwheel should appear in the bottom right of the Botpress UI, click it to restart the server. diff --git a/docs/enterprise/user-management-and-security/single-sign-on/sso-with-github-oauth2.md b/docs/enterprise/user-management-and-security/single-sign-on/sso-with-github-oauth2.md deleted file mode 100644 index 0944527..0000000 --- a/docs/enterprise/user-management-and-security/single-sign-on/sso-with-github-oauth2.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -id: sso-with-github-oauth2 -title: SSO with GitHub OAuth2 ---- - --------------------- - -## Step 1 - Create OAuth2 App - -1. Go on GitHub's [OAuth application registration page](https://github.com/settings/applications/new). -1. Choose an application name. -1. Set the Homepage URL to either your organization's website or your Botpress instance's external URL. -1. For the **Authorization callback URL**, set the following value: - -`https:///api/v1/auth/login-callback/oauth2/` - -:::note -You may choose any url safe name as your strategy name. -::: - -## Step 2 - Create Credentials - -1. In your application's configuration page, copy the **Client ID**. -1. Click on **generate a new client secret** and copy the generated value as well for the next step. - -## Step 3 - Configure Botpress - -1. In your Botpress instance, navigate to the **Code Editor**. -1. add a new entry within `authStrategies` in the `botpress.config.json` file. - 1. Name the strategy whatever you want (keep the name URL safe). - 1. fill in the entry in the following way: - -```json -"": { - "type": "oauth2", - "allowSelfSignup": false, - "options": { - "authorizationURL": "https://github.com/login/oauth/authorize", - "tokenURL": "https://github.com/login/oauth/access_token", - "clientSecret": "", - "clientID": "", - "callbackURL": "https:///api/v1/auth/login-callback/oauth2/", - "userInfoURL": "https://api.github.com/user", - "scope": "user:email" - }, - "fieldMapping": { - "email": "email" - } -} -``` - -## Step 4 - Enable the Strategy in Botpress - -Under the **Pro** settings in the `botpress.config.json` file, add your strategy name to the `collaboratorsAuthStrategies` array. - -Also make sure that the `externalAuth` object has `enabled` set to `true`: - -## Step 5 - Restart the Botpress Server - -A green cogwheel should appear in the bottom right of the Botpress UI, click it to restart the server. diff --git a/docs/enterprise/user-management-and-security/single-sign-on/sso-with-google-oauth2.md b/docs/enterprise/user-management-and-security/single-sign-on/sso-with-google-oauth2.md deleted file mode 100644 index bf7867f..0000000 --- a/docs/enterprise/user-management-and-security/single-sign-on/sso-with-google-oauth2.md +++ /dev/null @@ -1,83 +0,0 @@ ---- -id: sso-with-google-oauth2 -title: SSO with Google OAuth2 ---- - --------------------- - -## Step 1 - Create OAuth2 Credentials - -1. Go to your [Google Cloud dashboard](https://console.cloud.google.com/). -1. Create a project. -1. Navigate to **APIs & Services** from the sidebar. -1. Access the **Credentials** section. -1. Click **Create Credentials**. -1. Choose the **OAuth client ID** option. - -## Step 2 - Configure OAuth2 on Google Cloud - -1. On the client configuration page, choose **Web application** for the **Application type**. -1. Name it. -1. Under **Authorized redirect URIs**, add the following entry: - -`https:///api/v1/auth/login-callback/oauth2/` - -:::note -You may choose any URL safe name as your strategy name. -::: - -A popup with your client ID and client secret will show up, keep them for the next step. - -## Step 3 - Configure Botpress - -1. In your Botpress instance navigate to the **Code Editor**. -1. Add a new entry within `authStrategies` in the `botpress.config.json` file. -1. You may name the strategy whatever you want (keep the name URL safe). -1. Fill in the entry in the following way: - -```json -"": { - "type": "oauth2", - "allowSelfSignup": false, - "options": { - "authorizationURL": "https://accounts.google.com/o/oauth2/v2/auth", - "tokenURL": "https://www.googleapis.com/oauth2/v4/token", - "clientSecret": "", - "clientID": "", - "callbackURL": "https:///api/v1/auth/login-callback/oauth2/", - "userInfoURL": "https://openidconnect.googleapis.com/v1/userinfo", - "scope": "openid profile email" - }, - "fieldMapping": { - "email": "email" - } -} -``` - -## Step 4 - Enable the Strategy in Botpress - -Under the **Pro** settings in the `botpress.config.json` file (should be around line 143), add your strategy name to the `collaboratorsAuthStrategies` array. - -Also make sure that the `externalAuth` object has `enabled` set to `true`: - -```json -"pro": { - "collaboratorsAuthStrategies": [ - "default", - "" - ], -``` - -Also make sure that the `externalAuth` object has `enabled` set to `true`: - -```json -"externalAuth": { - "enabled": true, - "algorithms": [ - "HS256" - ], -``` - -## Step 5 - Restart the Botpress Server - -A green cogwheel should appear in the bottom right of the Botpress UI, click it to restart the server. diff --git a/docs/going-to-production/deploy/aws.md b/docs/going-to-production/deploy/aws.md deleted file mode 100644 index e6d8c1c..0000000 --- a/docs/going-to-production/deploy/aws.md +++ /dev/null @@ -1,244 +0,0 @@ ---- -id: aws -title: Amazon Web Services ---- - --------------------- - -Amazon Web Services provide on-demand cloud computing platforms and APIs to individuals, companies, and governments on a metered pay-as-you-go basis. - -## Quick Start with AWS - -To deploy your bot manually on Amazon Elastic Compute Cloud(EC2), create a new instance on EC2 (or use an existing one), and type the following commands: - -```bash -sudo apt update -sudo apt install unzip - -# Download the latest Linux binary (change $Version) -wget https://s3.amazonaws.com/botpress-binaries/botpress-$VERSION-linux-x64.zip - -# Unzip the content in the current directory -unzip botpress-$VERSION-linux-x64.zip - -# Launch the app -./bp -``` - -After following the steps above, an instance of Botpress will be available locally on port 3000. - -### Setting Up NGINX - -In general, NGINX is open-source software for web serving, reverse proxying, caching, load balancing, media streaming, and more. On our Botpress Server installation, NGINX allows us to reach two goals: serve as a reverse proxy and handle caching of assets. - -To get started with NGINX, install it by using the commands below: - -```bash -apt install nginx -sudo mkdir /tmp/nginx_cache -``` - -Configure NGINX to work with Botpress by editing the file `/etc/nginx/sites-available/default`. Please use our [suggested configuration](#NGINX_Config). - -### Securing Your Bot (HTTPS) - -To secure your installation, we will encrypt it: - -```bash -sudo apt-get install software-properties-common -sudo add-apt-repository ppa:certbot/certbot -sudo apt-get update -sudo apt-get install python-certbot-nginx -sudo certbot --nginx -``` - -### Monitoring and Resilience - -If you want to add resilience so that Botpress automatically reboots after shut down due to an issue, we recommend using PM2. - -```bash -sudo apt install npm -sudo npm install -g pm2 -sudo pm2 startup -``` - -## Amazon Web Services Using Dokku - -Dokku is like a mini heroku on-prem. Once set up on your host, it's straightforward to push deployments via a simple `git push`. - -### Creating Your EC2 Instance - -1. Open the EC2 Dashboard and click `Instances`. -1. Press the `Launch Instance` button -2. At the `Choose AMI` step, we recommend using Ubuntu Server 18.04 LTS. We also support Centos 7.5, Debian 8.11, Red-hat 7.5, Ubuntu 16.04. -3. Click on the tab named `6. Configure Security Group`. -4. Add these rules: - -- HTTP -- HTTPS -- Custom Port (3000) - -6. Click `Review and Launch`, then connect to your newly created instance using SSH. - -### Installing Dokku - -We have summarized the required steps, but you can [follow the official guide](http://dokku.viewdocs.io/dokku~v0.12.13/getting-started/installation/) if you prefer. - -```bash -wget https://raw.githubusercontent.com/dokku/dokku/v0.12.13/bootstrap.sh -sudo DOKKU_TAG=v0.12.13 bash bootstrap.sh -``` - -Once you complete your setup, open your web browser to your server's IP address and follow the instructions to configure your public key. Dokku will use the public key when you push content to deploy your bot. - -Then, on your Dokku host, type this command to create a new app: - -```bash -dokku apps:create botpress-server -``` - -:::note -We are using `botpress-server` in this guide, but it could be anything you want. -::: - -Now that everything is set up correctly on your remote host, let's deploy it. - -On your localhost, create an empty directory and add a file named `Dockerfile` with the following content: - -```docker -FROM botpress/server:$VERSION -WORKDIR /botpress -CMD ["./bp"] -``` - -When you push your repository to your Dokku host, it will automatically build the image and launch it. - -Type these commands: - -```bash -# Initialize a new repository -git init - -# Adds a new destination when pushing content on that repository. -# Your Dokku host will receive the content and will execute the Dockerfile -git remote add dokku dokku@$YOUR_EC2_IP_ADDRESS:botpress-server - -# Add the files, commit and push them to the host -git add . -git commit -m first -git push dokku master -``` - -### Adding a POSTGRES Database - -Now, your chatbot is running on the host, but it is still using the SQLite database. Fortunately, Dokku has an open-source plugin that makes it very easy to set up the required database. - -```bash -# This will download and install the Postgres plugin -sudo dokku plugin:install https://github.com/dokku/dokku-postgres.git - -# Creates a new database and link it to your application -dokku postgres:create botpress-db -dokku postgres:link botpress-db botpress-server - -# Tell Botpress what kind of database to use -dokku config:set botpress-server DATABASE=postgres -``` - -Dokku automatically sets the `DATABASE_URL` environment variable. - -### Example - -`channel-web.infoPage.description` --> `BP_MODULE_CHANNEL_WEB_INFOPAGE_DESCRIPTION` - -:::danger Deprecated Warning -`BP_%MODULENAME%_%config%` is deprecated and was removed in Botpress 12. -::: - -## NGINX_Config - -We recommend the configuration below when deploying Botpress in production. - -```bash -http { - # Disable sending the server identification - server_tokens off; - - # Prevent displaying Botpress in an iframe (clickjacking protection) - add_header X-Frame-Options SAMEORIGIN; - - # Prevent browsers from detecting the mimetype if not sent by the server. - add_header X-Content-Type-Options nosniff; - - # Force enable the XSS filter for the website, in case it was disabled manually - add_header X-XSS-Protection "1; mode=block"; - - # Configure the cache for static assets - proxy_cache_path /sr/nginx_cache levels=1:2 keys_zone=my_cache:10m max_size=10g - inactive=60m use_temp_path=off; - - # Set the max file size for uploads (make sure it is larger than the configured media size in botpress.config.json) - client_max_body_size 10M; - - # Configure access - log_format main '$remote_addr - $remote_user [$time_local] "$request" ' - '$status $body_bytes_sent "$http_referer" ' - '"$http_user_agent" "$http_x_forwarded_for"'; - - access_log logs/access.log main; - error_log logs/error.log; - - # Redirect unsecure requests to the HTTPS endpoint - server { - listen 80 default; - server_name localhost; - - return 301 https://$server_name$request_uri; - } - - server { - listen 443 http2 ssl; - server_name localhost; - - ssl_certificate cert.pem; - ssl_certificate_key cert.key; - - # Force the use of secure protocols only - ssl_prefer_server_ciphers on; - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - - # Enable session cache for added performances - ssl_session_cache shared:SSL:50m; - ssl_session_timeout 1d; - ssl_session_tickets off; - - # Added security with HSTS - add_header Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"; - - # Enable caching of assets by NGINX to reduce load on the server - location ~ .*/assets/.* { - proxy_cache my_cache; - proxy_ignore_headers Cache-Control; - proxy_hide_header Cache-Control; - proxy_hide_header Pragma; - proxy_pass http://localhost:3000; - proxy_cache_valid any 30m; - proxy_set_header Cache-Control max-age=30; - add_header Cache-Control max-age=30; - } - - # We need to add specific headers so the websockets can be set up through the reverse proxy - location /socket.io/ { - proxy_pass http://localhost:3000/socket.io/; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "Upgrade"; - } - - # All other requests should be directed to the server - location / { - proxy_pass http://localhost:3000; - } - } -} -``` diff --git a/docs/going-to-production/deploy/deploy.md b/docs/going-to-production/deploy/deploy.md deleted file mode 100644 index 6380bd7..0000000 --- a/docs/going-to-production/deploy/deploy.md +++ /dev/null @@ -1,275 +0,0 @@ ---- -id: deploy -title: Deploy ---- - --------------------- - -Botpress has added flexibility for developers who want access to the core codebase. You can clone Botpress from the source repository on Github, allowing you to test code, modules, and components more dynamically. - -## Compiling From Source - -You can build Botpress from the [source repository](https://github.com/botpress/botpress) in a few simple steps. Doing this is useful when you need to create custom modules and components. - -### Prerequisites - -Install node version 12.18.1 for [your operating system](https://nodejs.org/download/release/v12.18.1/). - -:::tip -On Windows, download and use the `.msi` installer. -::: - -Install [Yarn package manager](https://yarnpkg.com/). - -### Installation -While in the directory where you want to host your instance of Botpress, run the following commands in this sequence: - -1. `git clone git@github.com:botpress/botpress.git && cd botpress` -2. `yarn cache clean` (proceed to the next step if this command fails) -3. `yarn` -4. `yarn build` -5. `yarn start` - -If you bumped into some errors during the execution of the `yarn build` command, you can try resetting your local repository: -1. Go to the [Releases](https://github.com/botpress/botpress/releases) page. -1. Click the commit associated with the latest release to open the commit page. -1. Copy the full commit hash. -1. Run this command with the copied commit hash: `git reset `. -1. Run `yarn build` again. - -:::note -If you are in a hurry and cannot wait for a fix release, [clone the commit](https://coderwall.com/p/xyuoza/git-cloning-specific-commits). Do not modify files one by one. -::: - -## Ubuntu Systems - -You might run into issues while trying to build and start botpress via yarn on Rasberry Pi OS x64 or other Ubuntu Systems. Its ARM Architecture means none of the pre-built binaries will work. On trying to run the command `yarn start`, you might run into an error like the one below: - -```bash -yarn start -yarn run v1.22.10 -$ cd ./out/bp && cross-env NODE_PATH=./ cross-env BP_MODULES_PATH=./data/modules/:../../modules:../../internal-modules node index.js -Error starting botpress -Error: Could not require NativeExtension "crfsuite.node" for OS "linux debian_10". - ... -Could not require NativeExtension "crfsuite.node" for OS "linux debian_10". - ... ----STACK--- -Error: Could not require NativeExtension "crfsuite.node" for OS "linux debian_10". - ... -error Command failed with exit code 1. -info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. -``` - -To avoid this error, you can build native extensions for Ubuntu using the docker file below: - -```dockerfile -FROM ubuntu:18.04 -RUN apt update && apt install -y gnupg curl git build-essential cmake pkg-config -RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - && \ - apt install -y nodejs && \ - npm install -g yarn node-pre-gyp -RUN mkdir /build - -WORKDIR /build/node-fasttext -RUN git clone https://github.com/botpress/node-fasttext.git . -RUN git submodule update --init && sh linux-build.sh && npm install && npm run-script build - -WORKDIR /build/node-crfsuite -RUN git clone https://github.com/botpress/node-crfsuite.git . -RUN git submodule update --init && npm install && npm run-script build - -WORKDIR /build/node-svm -RUN git clone https://github.com/botpress/node-svm.git . -RUN git submodule update --init && npm install && npm run-script build - -WORKDIR /build/node-sentencepiece -RUN git clone https://github.com/botpress/node-sentencepiece.git . -RUN git submodule update --init && npm install && npm run-script build - -CMD ["bash"] -``` - -Replicate this docker file using your distribution (such as Raspbian) and use it. After that, find the file with extension `*.node` for all libraries. - -To acess this file (with extension `*.node`), start a docker container with the image you just built. Enter this container using the command: - -`docker run -it --rm --name bp-bindings` - -Inside each of `/build/node-fasttext/*`,` /build/node-crfsuite/*`,` /build/node-svm/*` and `/build/node-sentencepiece/*` there should be a `build/` or `release/` directory where you’ll find a file with extension `*.node`. - -If you’re running Botpress from sources, the correct location would either be: `build/native-extensions/linux/default or create` the directory `build/native-extensions/linux/`. You can look at the file `rewire.ts` if you want to see how the important processes occur. - -If you’re using the Botpress official binary, place the files in a directory named `bindings`. - -After following the instructions above, you're good to go. - -## Config File - -Botpress uses `JSON` files for most configurations. Environment variables can also set configuration. - -## Botpress Global Config - -The Botpress global config file is the main file used to configure the Botpress server. Your instance of Botpress creates this file automatically if it is missing. Default values should work well when using Botpress, but we will show you other configurations you may need to change on this page. - -To get more information about each option, check out the [comments on the configuration schema](https://github.com/botpress/botpress/blob/master/src/bp/core/config/botpress.config.ts) - -## HTTP Server Configuration - -By default, Botpress starts an HTTP server on localhost, listening to port 3000. If the configured port is already in use, it will pick the next available one. You can change these by editing `httpServer.host` and `httpServer.port`. - -### Going to Production - -When going to production and publishing your chatbot, you will need to change some of the server settings. - -The server doesn't support HTTPS connections, so you will need to set up a reverse proxy in front of it (for example: NGINX). In the main [repo](https://github.com/botpress/botpress), Botpress have created an example with a HTTPS with [docker-compose](https://github.com/botpress/botpress/blob/master/examples/docker-compose/docker-compose-community-nginx-https.yaml). - -:::note Example -``` -$ docker-compose -f docker-compose-community-nginx-https.yaml up -d -``` - -[![asciicast](https://asciinema.org/a/gexyfstCsIGjLWX1sb8cZIWn3.svg)](https://asciinema.org/a/gexyfstCsIGjLWX1sb8cZIWn3) -::: - -Your server still listens to connections on port 3000, but your reverse proxy answers queries on port 80. The reverse proxy handles secure connections if you want to access your bot using `https`. - -At this point, Botpress doesn't know how to access the bot from the web. You need to set the configuration variable to the complete host name (URL) in `httpServer.externalUrl`. - -### Changing the Base URL of Your Bot - -By default, Botpress is accessible at your domain root (ex: https://bot.botpress.com/). You can change that to serve it from a different URL, for example `https://bot.botpress.com/botpress/somepath/`. To do so, set the External URL either in environment variable (`EXTERNAL_URL`) or via the `botpress.config.json` file. - -The new root path will be automatically extracted from that URL. - -## Logs Configuration - -Logs are very useful to debug and understand what happens when the bot doesn't behave as expected. - -When you start Botpress from the binary (or using the Docker image), the bot is in `debug` mode. This means that a lot of information will be displayed in the console to understand what happens. - -There are 5 different levels of logs: - -- Debug: displays very detailed information about the bot operations; -- Info: gives general information or "good-to-know" stuff; -- Warn: means that something didn't go as expected, but the bot was able to recover; -- Error: there was an error that should be addressed; -- Critical: something prevents the bot or the server from behaving correctly (may not work at all). - -### Change Log Verbosity - -There are three different configuration of verbosity for the logger: - -- Production (verbosity: 0) -- Developer (verbosity: 1) -- Debug (verbosity: 2) - -By default, Botpress uses the `Debug` configuration. - -:::note -When you run Botpress in production `BP_PRODUCTION=true` or with cluster mode `CLUSTER_ENABLED=true`, logs are configured as `Production`. -::: - -You can configure the level of verbosity using an environment variable (`VERBOSITY_LEVEL=0` for production) or using command line (ex: `-vv` for Debug). - -#### Production - -- The console displays `info`, `warn`, `error` and `critical` logs; -- In the studio's log console, bot developers sees `debug` logs for their bot; -- No stack traces are displayed in the console. - -#### Developer - -- Same thing as `Production`, but the console will also include stack traces. - -#### Debug - -- Includes everything from `Production` and `Developer`; -- Debug logs are displayed in the main console. - -### How to Save Logs on the File System - -:::note -You can also send log outputs to a file in a specific folder. -::: - -Edit your `botpress.config.json` file and change your file to match the following: - -```js -{ - ... - "logs": { - ... - "fileOutput": { - "enabled": true, - "folder": "./", // Change this to any folder, by default it will be in the same folder as the executable - "maxFileSize": 10000 // By default, the maximum file size will be kept under 10mb - } - }, -} -``` - -## Advanced Logging - -In a production environment, you may want to persist additional logs such as full audit trail. You can enable more granular logs by using the [DEBUG environment variable](/building-chatbots/testing-&-debugging/debugger)) and saving those extra logs to a separate file: - -```sh -# Linux & OSX -# Append audit trail to log file -DEBUG=bp:audit:* ./bp -p 2>> ./botpress.log -``` - -:::tip -You can combine this with a log rotation tool such as [newsyslog](https://www.real-world-systems.com/docs/newsyslog.1.html) or [logrotate](https://linux.die.net/man/8/logrotate). -::: - -## Enable or disable modules - -When you start Botpress for the first time, the most popular modules included with the binary will be added to your `botpress.config.json` file. If you want to disable or enable modules, you may either do so in the Admin, or edit the `modules` property in `botpress.config.json`. - -:::note -The string `MODULE_ROOT` is a special one that is replaced when your configuration file is read. It represents the location of the modules folder on your hard drive; you shouldn't have to change it. -::: - -![Admin Modules Page](/assets/admin_modules.png) - -```js -{ - ..."modules": [ - {// When you add new modules, you need to set their location, and if they are enabled or not. - "location": "MODULES_ROOT/analytics", - "enabled": true // You can change this to false to disable the module. - }, - { - "location": "MODULES_ROOT/basic-skills", - "enabled": true - } -} -``` - -## Individual Bot Configuration - -Every bot that you create has its own configuration file, located at `data/bots/BOT_ID/bot.config.json`. Most of the available options can be edited by clicking on the `Config` link next to the bot name in the Admin, or accessing the configuration panel from the Conversation Studio. - -## Module Configuration - -When you enable a module on Botpress, it is available globally, which means that you can't disable or enable them for specific bots. However, you can configure every bot differently. - -When you run a module for the first time, the default configuration is created in `data/global/config/MODULE_NAME.json`. If you need a special configuration for your bot, from the Code Editor you can right click any global configuration, then **Duplicate to current bot**. - -Alternatively, you can manually create a `config` folder (such as `data/bots/BOT_ID/config/MODULE_NAME.json`) in the bot folder and copy the configuration file there. - -### Security - -These variables can be used to disable some sensitive features destined to Super Admins. - -| Environment Variable | Description | Default | -| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------- | -| `BP_CODE_EDITOR_DISABLE_ADVANCED` | The advanced editor lacks some safeguard and is only intended for experienced users. It can be disabled completely using this environment variable. | `false` | -| `BP_CODE_EDITOR_DISABLE_UPLOAD` | Prevent users from uploading files when using the advanced editor. | `false` | -| `BP_DISABLE_SERVER_CONFIG` | Prevent Super Admins from accessing the "Production Checklist" page on the Admin panel, since it may contain sensitive information. | `false` | - -## More Information - -- Check out the database page for details about `DATABASE_URL`. -- Check out the cluster page for details about `CLUSTER_ENABLED` and `REDIS_URL`. \ No newline at end of file diff --git a/docs/going-to-production/deploy/digitalocean.md b/docs/going-to-production/deploy/digitalocean.md deleted file mode 100644 index 26881dd..0000000 --- a/docs/going-to-production/deploy/digitalocean.md +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: digitalocean -title: DigitalOcean ---- - --------------------- - -## Prerequisite - -- Create a domain name dedicated to your Botpress Cluster, and generate a certificate. If you don't have a certificate, you can [follow these instructions to generate one quickly using Let's Encrypt.](https://www.digitalocean.com/community/tutorials/how-to-use-certbot-standalone-mode-to-retrieve-let-s-encrypt-ssl-certificates-on-ubuntu-1804) - -## Instructions - -1. [Create a new Load Balancer](https://docs.digitalocean.com/products/networking/load-balancers/how-to/create/#:~:text=Setting%20up%20a%20load%20balancer,the%20Load%20Balancers%20overview%20page.) - - - Forwarding Rules: `HTTPS 443` -> `HTTP 3000` (define the pre-requisite certificate created earlier). It is also possible to use [Passthrough](https://www.digitalocean.com/docs/networking/load-balancers/how-to/ssl-passthrough/) if you setup NGINX to redirect HTTPS requests. - - Health Checks: You might want to set those numbers lower. - - Sticky Sessions: `Enabled`. - -2. Create a droplet (_Ubuntu 20.04_) for your [Redis instance](https://www.digitalocean.com/community/tutorials/how-to-install-and-secure-redis-on-ubuntu-20-04) - - - Update the `bind` settings so your BP nodes can reach it. - - Secure it with a strong password. - -3. Create a droplet (_Ubuntu 20.04_) for your [Postgres instance](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-20-04) - - - Define a password for your Postgres user. - - Make it accessible by each BP nodes. - - Create a new database. - -4. Create a droplet (_Ubuntu Docker 18.06_) for each BP node you want to use. You will use the first one to configure our cluster's database and licensing. - -5. Create a `server.yml` file and upload it on the first droplet. This file identifies which Docker image you will use and sets the required environment variables. - -```yml -version: '3.5' - -services: - botpress: - image: botpress/server:$TAG - environment: - - BP_CONFIG_PRO_ENABLED=true - - CLUSTER_ENABLED=true - - BP_CONFIG_PRO_LICENSEKEY= - - EXTERNAL_URL=https://yourbot.yourhostname.com - - DATABASE_URL=postgres://user:pass@host/dbName - - REDIS_URL=redis://host:port - command: './bp' - ports: - - '3000:3000' -``` - -6. Upload the file `server.yml` file on each node created in step 4. - -7. Run the command `docker-compose -f server.yml up -d` on each node, and your Botpress Cluster is ready! diff --git a/docs/going-to-production/deploy/docker-compose.md b/docs/going-to-production/deploy/docker-compose.md deleted file mode 100644 index 52c8cec..0000000 --- a/docs/going-to-production/deploy/docker-compose.md +++ /dev/null @@ -1,203 +0,0 @@ ---- -id: docker-compose -title: Docker Compose ---- - --------------------- - -Docker is a set of platform-as-a-service products that use OS-level virtualization to deliver software in packages called containers. - -:::note -For an optimized Docker experience, download [Docker Desktop](https://www.docker.com/products/docker-desktop). -::: - -## Latest tags - -The latest tags are updated every time a new release is created. Each release has a tag associated with it. - -:::tip -Use the fix tag for production. -::: - -## Using Remote Duckling & Language Server - -This command will run Botpress within a single container and use the remote Duckling and Language Server hosted by us. You can get the latest `stable` or `nightly` versions on [DockerHub](https://hub.docker.com/r/botpress/server/tags). - -```bash -docker run -d \ ---name botpress \ --p 3000:3000 \ --v botpress_data:/botpress/data \ -botpress/server:$TAG -``` - -For instance, you can run an installation as follows: - -```bash -User@DESKTOP-T1ORLFU MINGW64 /c/Botpress/DockerTests -$ docker run -d \ -> --name myBotpress \ -> -p 3000:3000 \ -> botpress/server:v12_18_2 -Unable to find image 'botpress/server:v12_18_2' locally -v12_18_2: Pulling from botpress/server -32802c0cfa4d: Pulling fs layer -da1315cffa03: Pulling fs layer -fa83472a3562: Pulling fs layer -f85999a86bef: Pulling fs layer -26b3263a34bb: Pulling fs layer -7e33a4644769: Pulling fs layer -f85999a86bef: Waiting -26b3263a34bb: Waiting -7e33a4644769: Waiting -da1315cffa03: Download complete -fa83472a3562: Verifying Checksum -fa83472a3562: Download complete -f85999a86bef: Download complete -32802c0cfa4d: Download complete -32802c0cfa4d: Pull complete -da1315cffa03: Pull complete -fa83472a3562: Pull complete -f85999a86bef: Pull complete -26b3263a34bb: Verifying Checksum -26b3263a34bb: Download complete -26b3263a34bb: Pull complete -7e33a4644769: Verifying Checksum -7e33a4644769: Download complete -7e33a4644769: Pull complete -Digest: sha256:798b0fe332c5bb1b707eb62b30c8ed0a4e0609b3c712ee7201c5a7da7be50b7f -Status: Downloaded newer image for botpress/server:v12_18_2 -bf038c6f84aaeec11773b93a9748bc6732d573a1c115523f1a3d28d20dc06cbe -``` - -You will be able to access your instance of Botpress on the specified mapped port `-p 3000:3000` by visiting http://localhost:3000/, and your container name will be myBotpress as set at `--name myBotpress`. Your Docker Desktop will reflect the new container as below: - -![Botpress Container on Docker](/assets/docker-new-instance.png) - -Hosting Duckling and the Language Server is optional. Your Botpress installation will use our hosted services by default. - -Choose to either run one of two containers (running two containers is recommended). - -### Single Container With All Services - -:::danger -**Never** run multiple processes inside a single container in production. -::: - -This method will run Duckling, the Language Server, and Botpress Server within the same container. It will set some environment variables so that services talk to each other. - -```bash -docker run -d \ ---name bp \ --p 3000:3000 -p 3100:3100 \ --v botpress_data:/botpress/data \ --e BP_MODULE_NLU_DUCKLINGURL=http://localhost:8000 \ --e BP_MODULE_NLU_LANGUAGESOURCES='[{ "endpoint": "http://localhost:3100" }]' \ -botpress/server:$TAG \ -bash -c "./duckling & ./bp lang --langDir /botpress/data/embeddings & ./bp" -``` - -**Offline Server**: Follow the Offline Server [instructions](#offline-servers) if you're running a server without Internet access. - -### Running Multiple Containers - -1. Run the Language Server. - -```bash -docker run -d \ ---name lang \ --p 3100:3100 \ --v botpress_data:/botpress/data \ -botpress/server:$TAG \ -bash -c "./bp lang --langDir /botpress/data/embeddings" -``` - -2. Run Botpress Server and Duckling within the same container. Duckling's usage is very light here, so we can justify using it in the same container as Botpress Server. - -```bash -docker run -d \ ---name bp \ --p 3000:3000 \ --v botpress_data:/botpress/data \ --e BP_MODULE_NLU_LANGUAGESOURCES='[{ "endpoint": "http://localhost:3100" }]' \ -botpress/server:$TAG \ -bash -c "./duckling & ./bp" -``` - -**Offline Server**: Follow the Offline Server [instructions](#offline-servers) if you're running a server without Internet access. - -### Use docker-compose - -Botpress can be used with other service. For example, a postgresql could be use instead of the default database. - -``` -version: '3' - -services: - botpress: - image: botpress/server - command: /botpress/bp - expose: - - 3000 - environment: - - DATABASE_URL=postgres://postgres:secretpw@postgres:5435/botpress_db - - REDIS_URL=redis://redis:6379?password=redisPassword - - BP_MODULE_NLU_DUCKLINGURL=http://botpress_lang:8000 - - BP_MODULE_NLU_LANGUAGESOURCES=[{"endpoint":"http://botpress_lang:3100"}] - - CLUSTER_ENABLED=true - - BP_PRODUCTION=true - - BPFS_STORAGE=database - depends_on: - - botpress_lang - - postgres - - redis - volumes: - - ./botpress/data:/botpress/data - ports: - - "3000:3000" - - botpress_lang: - image: botpress-lang - command: bash -c "./duckling -p 8000 & ./bp lang --langDir /botpress/lang --port 3100" - expose: - - 3100 - - 8000 - volumes: - - ./botpress/language:/botpress/lang - - postgres: - image: postgres:11.2-alpine - expose: - - 5435 - environment: - PGPORT: 5435 - POSTGRES_DB: botpress_db - POSTGRES_PASSWORD: secretpw - POSTGRES_USER: postgres - volumes: - - pgdata:/var/lib/postgresql/data - - redis: - image: redis:5.0.5-alpine - expose: - - 6379 - command: redis-server --requirepass redisPassword - volumes: - - redisdata:/data - -volumes: - pgdata: - redisdata: - -``` - -### Restarting Botpress - -You can restart the server from Botpress UI. To achieve this, edit the `botpress.config.json` file from within the Code Editor module (located in the left sidebar). Botpress listens for changes to this config file. - -![Restarting Botpress on Docker](/assets/docker-restart.png) - -After you have edited the `botpress.config.json` file, save it. You will now see an orange cog at the bottom right corner of the screen: - -![Orange Restart Icon](/assets/restart-cog.png) - diff --git a/docs/going-to-production/deploy/enterprise-scaling.md b/docs/going-to-production/deploy/enterprise-scaling.md deleted file mode 100644 index 702c188..0000000 --- a/docs/going-to-production/deploy/enterprise-scaling.md +++ /dev/null @@ -1,87 +0,0 @@ ---- -id: enterprise-scaling -title: Enterprise Scaling (Clustering) ---- - --------------------- - -## Cluster Overview - -![High-Level Diagram](/assets/bp-cluster.png) - -## Requirements - -- Redis Server v5+ -- PostgreSQL 10+ -- Load Balancer with a public address -- Botpress license registered with a public address - -## Interfaces Overview -![HTTP Interfaces](/assets/http-interfaces.png) - -## Enable Redis - -Start Botpress on a single node with these environment variables: - -**Binary:** - -```bash -BP_CONFIG_PRO_ENABLED=true -CLUSTER_ENABLED=true \ -BPFS_STORAGE=database \ -BP_CONFIG_PRO_LICENSEKEY= \ -EXTERNAL_URL= \ -REDIS_URL=redis://host:port \ -DATABASE_URL=postgres://login:password@host:port/database \ -./bp -``` - -**Docker:** - -```bash -docker run -d \ ---name bp \ --p 3000:3000 \ --v botpress_data:/botpress/data \ --e PRO_ENABLED=true \ --e CLUSTER_ENABLED=true \ --e BPFS_STORAGE=database \ --e BP_LICENSE_KEY= \ --e EXTERNAL_URL= \ --e REDIS_URL=redis://host:port \ --e DATABASE_URL=postgres://login:password@host:port/database \ -botpress/server:$TAG -``` - -:::caution -Do not use the `BP_REDIS_SCOPE` parameter as it can possibly lead to performance and/or data issues, thus stable operation is not guaranteed. Our team will not support implementations with the use of `BP_REDIS_SCOPE`. -::: - -Once the first node starts, use the same command to start Botpress on the other nodes. - -## Enable Redis Replication - -Botpress can connect to multiple Redis servers for better redundancy if one of the Redis servers goes down. To enable this, you must set the `REDIS_URL` variable to a host/port combinations list. - -Provide the list as a `JSON` object. See the example below for the correct format. - -```bash -PRO_ENABLED=true -CLUSTER_ENABLED=true \ -BPFS_STORAGE=database \ -BP_LICENSE_KEY= \ -EXTERNAL_URL= \ -REDIS_URL=[{"host":"localhost","port":7004},{"host":"localhost","port":7001},{"host":"localhost","port":7002}] -DATABASE_URL=postgres://login:password@host:port/database \ -./bp -``` - -## Advanced Redis Options - -You can further configure your Redis Sentinel/Cluster using the `REDIS_OPTIONS` environment variable. Please consult the [ioredis documentation](https://github.com/luin/ioredis/blob/master/API.md) for the complete list of options. - -**Example:** - -```bash -REDIS_OPTIONS={"password":"admin123", "connectTimeout": 20000} -``` diff --git a/docs/going-to-production/deploy/linux.md b/docs/going-to-production/deploy/linux.md deleted file mode 100644 index d98d127..0000000 --- a/docs/going-to-production/deploy/linux.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: linux -title: Linux (Bare Metal) ---- - --------------------- diff --git a/docs/going-to-production/deploy/windows.md b/docs/going-to-production/deploy/windows.md deleted file mode 100644 index b52f688..0000000 --- a/docs/going-to-production/deploy/windows.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -id: windows -title: Windows (Bare Metal) ---- - --------------------- diff --git a/docs/going-to-production/development-lifecycle/versioning.md b/docs/going-to-production/development-lifecycle/versioning.md deleted file mode 100644 index 959cf13..0000000 --- a/docs/going-to-production/development-lifecycle/versioning.md +++ /dev/null @@ -1,54 +0,0 @@ ---- -id: versioning -title: Versioning ---- - --------------------- - -Once your bot is deployed, the good part is that you (and non-technical team members) can still make changes to your bots from Botpress Conversation Studio. This is one major advantage of using Botpress. This is made possible by our built-in versioning system. - -For your convenience Botpress provides the GUI tools to edit these files while in development. We also provide the same tools in production, but there's a caveat. Writing changes to the server's file system is not always possible, they could easily be lost due to ephemeral filesystems or they could be ignored when running in a cluster setup. - -To address this issue, we added commands to the cli. In production, your changes are saved to the database which is persisted between deployments. Botpress cli gives you two commands: `bp pull` to pull pending changes on your server for all your bots and server wide files and `bp push` to push your local changes to your server. - -You can also head to the versioning tab of your botpress admin panel at https://your.bp.ai/admin/server/version, the command will be properly formatted for you (including your token) any changes have been made. Just paste it to your shell and the changes will be extracted in the provided target directory. A successful output should look like the following: - -![versioning pull](/assets/versioning-pull.png) - -Notice that without any changes, you will see a **You're all set!** message. - -## CLI Commands - -:::note -The `BPFS_STORAGE` environment variable must be set to `database` to enable **pushing** to this node. -::: - -Please note that `targetDir` and `sourceDir` uses relative paths: - -### Pull - -**Binary:** - -```bash -./bp pull --url --token --targetDir -``` - -**Docker:** - -```bash -docker exec -it bash -c "./bp pull --url --token --targetDir " -``` - -### Push - -**Binary:** - -```bash -./bp push --url --token --sourceDir -``` - -**Docker:** - -```bash -docker exec -it bash -c "./bp push --url --token --sourceDir " -``` diff --git a/docs/going-to-production/environment-variables.md b/docs/going-to-production/environment-variables.md deleted file mode 100644 index c12616e..0000000 --- a/docs/going-to-production/environment-variables.md +++ /dev/null @@ -1,47 +0,0 @@ ---- -id: environment-variables -title: Environment Variables ---- - --------------------- - -## Environment Variables - -Most of these variables can be set in the configuration file `data/global/botpress.config.json`. - -Infrastructure configuration (such as the database, cluster mode, etc.) isn't available in the configuration file, since it'ss required before the config is loaded. - -Botpress supports `.env` files, so you don't have to set them every time you start the app. Save the file in the same folder as the executable. - -### Common Variables - -| Environment Variable | Description | Default | -| ---------------------- | ----------------------------------------------------------------------------------- | ------------------ | -| `PORT` | Sets the port that Botpress will listen to. | `3000` | -| `BP_HOST` | The host to check for incoming connections. | `localhost` | -| `EXTERNAL_URL` | This is the external URL that users type in the address bar to talk with the bot. | `http://HOST:PORT` | -| `DATABASE_URL` | Full connection string to connect to the DB. For Postgres, start with `postgres://`.| - | -| `BP_PRODUCTION` | Sets Botpress in production mode. This has the same effect as starting it with `-p`.| `false` | -| `BPFS_STORAGE` | Storage destination used by BPFS to read and write files (global and bots). | `disk` | -| `PRO_ENABLED` | Enables the pro version of Botpress, the license key will be required. | `false` | -| `BP_LICENSE_KEY` | Your license key (can also be specified in `botpress.config.json`). | - | -| `CLUSTER_ENABLED` | Enables multi-node support using Redis. | `false` | -| `REDIS_URL` | The connection string to connect to your Redis instance. | - | -| `AUTO_MIGRATE` | Automatically migrates bots up to the running Botpress version. | - | -| `DEBUG` | Namespaces to [debug](#advanced-logging). | - | - -### Runtime and Modules - -| Environment Variable | Description | Default | -| --------------------------- | ------------------------------------------------------------------------------------------- | --------- | -| `VERBOSITY_LEVEL` | Botpress will be more chatty when processing requests. This has the same effects as `-v`. | | -| `BP_DECISION_MIN_CONFIENCE` | Sets the minimum threshold required for the Decision Engine to elect a suggestion. | `0.5` | -| `FAST_TEXT_VERBOSITY` | Define the level of verbosity that FastText will use when training models. | `0` | -| `FAST_TEXT_CLEANUP_MS` | The model will be kept in memory until it receives no messages to process for that duration.| `60000` | -| `REVERSE_PROXY` | When enabled, it uses "x-forwarded-for" to fetch the user IP instead of remoteAddress. | `false` | - -It is also possible to use environment variables to override module configuration. The pattern is `BP_MODULE_%MODULE_NAME%_%OPTION_PATH%`, all in upper case. For example, to define the `languageSources` option of the module `nlu`, you would use `BP_MODULE_NLU_LANGUAGESOURCES`. - -:::tip -You can list the available environment variables for each module by enabling the `DEBUG=bp:configuration:modules:*` flag. -::: \ No newline at end of file diff --git a/docs/going-to-production/requirements/benchmarking.md b/docs/going-to-production/requirements/benchmarking.md deleted file mode 100644 index d7573bc..0000000 --- a/docs/going-to-production/requirements/benchmarking.md +++ /dev/null @@ -1,57 +0,0 @@ ---- -id: benchmarking -title: Benchmarking ---- - --------------------- - -## Hardware Requirements - -- Hard Drive: 64 GB of free space or above. -- Memory (RAM): 4 GB or above. - -## Benchmark Tool - -Run Botpress with the `bench` command from the command line. You can run this on the Pro binary downloaded from the website. Make sure to adjust the `--url` and `--botId` to match your botpress server URL and your bot's ID. For more information on options, you can set for your test, run `./bp bench --help`. -![Performances Benchmark Tool](/assets/performances-benchmark.png) - -### Example - -Below is an example of the output from a benchmark test run on a new install of Botpress on localhost. - -```bash -$ ./bp bench --url http://0.0.0.0:3000/ --botId test -u 1000 - Scenario: 1000 users sending 5 messages each - Configured SLA: 100% of requests must be under 1500ms - -[18:09:50] Messages Sent: 11, Avg: 7456ms -... -[18:10:53] Messages Sent: 4843, Avg: 12410ms - - Messages Sent: 5000 in 70.82s - Average MPS: 70.6 - SLA Breached: true. 4767 messages were over configured SLA (95.34%) - - Request Latency: - min: 53 ms - avg: 12085 ms - max: 62517 ms - - Codes: - Timeout: 2172 - undefined: 429 - ECONNRESET: 411 - ECONNREFUSED: 1988 -``` - -From the results: -- It took 70.82 seconds to send 5000 messages to the chatbot. -- 4767 messages took longer than 1500 ms to send to the chatbot. -- The minimum time it took for a request to be processed was 53 ms (average was 12085 ms, and the maximum was 62517 ms) -- Of the messages sent, the benchmark test received the following error codes - - Timeout: 2172 - - undefined: 429 - - ECONNRESET: 411 - - ECONNREFUSED: 1988 - -You can also use [k6](https://k6.io/), a popular open-source load testing tool and SaaS for engineering teams. \ No newline at end of file diff --git a/docs/going-to-production/requirements/requirements.md b/docs/going-to-production/requirements/requirements.md deleted file mode 100644 index 8ba8d4b..0000000 --- a/docs/going-to-production/requirements/requirements.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -id: requirements -title: Requirements ---- - --------------------- - -You want to use Botpress to create the best chatbot ever? Then, take a look at the list below to know what the minimum (and sometimes maximum) hardware and software specification you need. - -## Supported Browsers - -You can use your favorite browser. Remember that if you encounter a problem, you can contact us! - -## Mimimum Hardware Requirements - -### Botpress - -- CPU: 1 -- RAM: 2GB -- Optimal: 40 messages/second -- Maximum: 60 messages/second - -### PostgreSQL (database) - -- CPU: 2 -- RAM: 4 GB -- Minimum: 60 messages/second -- Maximum: 600-800 messages/second - -## Messaging - -The volume of messages contained in a single session is highly variable. It depends mainly on the targeted product, the domain, and the customers. See the following examples: - -- Simple Q&A Bot: - - Example: Covid-19 information Bot - - #msg/session: 4-5 msgs/session - -- Complex contextual Bot: - - Example: Customer service Bot: - - #msg/session: 10-20 msgs/session - -- Special Cases (Persistent Sessions): - - Example: Classroom bot with persistent session - - #msg/session: 1000-5000 msgs/session - -## Supported Operating Systems - -- Windows 10 -- Mac OS catalina or BigSur -- Ubuntu 18.04 or 20.04 -- Debian 8.11 -- Red Hat 7.5 -- CentOS 7.5 - -## Infrastructure Best Practices - -- Use at least 2 environments (development, staging, production…) to minimalize the impact on the end-user experience. -- Create backups and continue maintenance of all components (especially the databases and storage components to mitigate and prevent data loss). -- Gradually execute maintenance and upgrades to ensure the system safety and its accuracy before exposing it to users (A/B, Canary deployments). For simpler implementations, predefine time ranges with low or null usage for the components maintenance. Don't forget to warn your users! -- Allocate the least privileges and accesses possible. This ensures the environment security, prevents breaches, and preserves the data integrity. \ No newline at end of file diff --git a/docs/going-to-production/updating.md b/docs/going-to-production/updating.md deleted file mode 100644 index f6fa562..0000000 --- a/docs/going-to-production/updating.md +++ /dev/null @@ -1,53 +0,0 @@ ---- -id: updating -title: Updating Botpress ---- - --------------------- - -Download the latest Botpress version [here](https://botpress.com/download). - -## Version 12 - -### SQLite - -:::caution -Please backup your `/data` folder before making any changes. -::: - -1. Download and extract the new version of Botpress. -2. Copy the content of your previous `/data` folder. -3. Paste the content into the `/data` folder of the new version, then delete the `assets` folder. -4. Start Botpress with `--auto-migrate` on the command line, or `AUTO_MIGRATE=true` environment variable. - -### PostgreSQL - -:::caution -Please backup your database before making any changes. -::: - -1. Download and extract the new version of Botpress. -2. Start Botpress with `--auto-migrate` on the command line, or `AUTO_MIGRATE=true` environment variable. - -To start the latest version of Botpress on a new database, you will need to pull `/data` to your filesystem. - -Luckily, we have a tool for that: - -1. In Botpress running the old version, from the admin section, go to `Profile > Server > Version Control`. -2. Copy the command from **Version Control**, or **Download archive**. -3. From the old version's root, open a terminal and execute the command. `/data` is now synced to filesystem. -4. Copy `/data` and paste in the new version's root. If you downloaded the archive, extract its contents to `/data`. -5. Set the environment variable `DATABASE_URL` to the new database. -6. Start Botpress. The filesystem will sync to the database automatically. - -#### Custom assets - -For both database systems, if you have any custom assets, do these extra steps: - -1. Start Botpress, wait for the server to be ready, then stop it. This creates the updated assets for all components. -2. Restore your custom asset files. Check and make sure they are compatible with your latest version. -3. Restart Botpress. - -## Version 11 and earlier - -Even though Botpress Server has become much more stable, breaking changes still might occur. When they do, resolving them is often as simple as editing config files in the `/data` folder. diff --git a/docs/management/analytics.md b/docs/management/analytics.md new file mode 100644 index 0000000..498876f --- /dev/null +++ b/docs/management/analytics.md @@ -0,0 +1,26 @@ +--- +title: Analytics +--- + +![Analytics](/img/docs/chatbot_charts.png) +Analytics is available only for an activated bot, it holds infromation about the usage and performance of your bot. Analytics tab is per bot and it shows a dashboard that holds graphs, numbers and indexes about for the selected period. + +## Selected Period +You can change the selected period to focus on specific period details. By default it is set for the past week, you are still able to change it. + + +## 1. Total Users +The absolute total number of users during the selected period. Next to it an index that show the percentage of increase/decrease in the total users using the chatbot compared to previous priod(s). + +## 2. New users +The absolute number of new users during the selected period. Next to it an index that show the percentage of increase/decrease in the new users using the chatbot compared to previous priod(s). +## 3. Returning Users +The absolute number of returning users during the selected period. Next to it an index that show the percentage of increase/decrease in the returning users using the chatbot compared to previous priod(s). +## 4. Session +The absolute number of session/conversations opened with the chatbot during the selected period. Next to it an index that show the percentage of increase/decrease in the number of the opened sessios compared to previous priod(s). + +## 5. Messages +The absolute number of messages sent to the chatbot during the selected period. Next to it an index that show the percentage of increase/decrease in the number of the messages sent to the chatbot compared to previous priod(s). + +## 6. Overall Dashboard +This graph shows the relation between users, sessions and messages over a period of time. \ No newline at end of file diff --git a/docs/management/chat.md b/docs/management/chat.md new file mode 100644 index 0000000..52340fe --- /dev/null +++ b/docs/management/chat.md @@ -0,0 +1,7 @@ +--- +title: Chat +--- + +![Chat](/img/docs/chatbot_chat.png) + +Once you've published your chatbot, you can quickly test it out from the cloud dashboard in the 'Chat' tab of your chatbot. diff --git a/docs/management/config-variables.md b/docs/management/config-variables.md new file mode 100644 index 0000000..9472569 --- /dev/null +++ b/docs/management/config-variables.md @@ -0,0 +1,18 @@ +--- +title: Configuration Variables +--- +![Config Variables](/img/docs/chatbot_config.png) +You can define configuration variables that will be accessible inside your Hooks and Actions. + +:::caution + +- Values are not synchronized automatically on the cloud and must be configured manually. +- Values set in studio are for development environment and values set in cloud are for production environment. + +::: + +![Chatbot Details](/img/docs/chatbot_config_steps.png) + +1. Go to Chatbot Information > Configuration variables and create a Key and add development environment's value. Click save and republish your chatbot. +2. On your cloud dashboard, under chatbot's Configuration Variables tab, you can set your production_value to the same key.(In case of different values for different environments) + diff --git a/docs/management/details.md b/docs/management/details.md new file mode 100644 index 0000000..35cfa10 --- /dev/null +++ b/docs/management/details.md @@ -0,0 +1,40 @@ +--- +title: Chatbot Details +--- +# Chatbot Details + +![Chatbot Details](/img/docs/chatbot_details.png) + + +## Admin Name + +The name displayed in the administration page. This name is only for the bot administrators. The end user will never see this name. + +## Display Name, Description & Language + +- Display name will be shown up in the chatbot's conversation. +- Bot Description will be shown up in the Bot info page. + +You can change your bot name, description and language from the studio.
+Go to Chatbot Information > General and edit the fields. Click save and republish your chatbot. +![Chatbot Description](/img/docs/chatbot_description.png) + + + +## Additional Details + +You can add more details to your chatbot info page like Website URL, Email, Phone Number, Terms & Privacy policy URLs.
+Go to Chatbot Information > Additional Details > Edit. Click save and republish your chatbot. +![Chatbot Description](/img/docs/chatbot_additional_details.png) + + + +## Danger Zone + +Danger Zone allows you to delete your chatbot permanently from your workspace. + +:::danger + +Additionally, make sure to backup your bot if you want to re-use it in the future. Click Download button (next to admin name) to have a copy of your bot before deleting it from your workspace. + +::: diff --git a/docs/management/logs.md b/docs/management/logs.md new file mode 100644 index 0000000..736854a --- /dev/null +++ b/docs/management/logs.md @@ -0,0 +1,22 @@ +--- +title: Logs +--- +# Add Logs to your chatbot +![Chatbot logs](/img/docs/chatbot_log.png) + +## Steps to add logs to your actions. +### Adding logger + +![Chatbot Logs](/img/docs/chatbot_logs.png) +1. Create an action. +2. Add bp.logger.info("Some text") inside your action and save it. + + +### Testing logs + +![Chatbot Logs](/img/docs/chatbot_logs_2.png) + +3. Go to the Explorer and add an action to any node. Click on publish. +4. Now, go to your cloud dashboard navigate to your published chatbot. +Have a chat with your bot in the 'Chat' tab of the menu. +Switch to logs tab to check the logs of your actions. diff --git a/docs/management/messaging.md b/docs/management/messaging.md new file mode 100644 index 0000000..321176d --- /dev/null +++ b/docs/management/messaging.md @@ -0,0 +1,16 @@ +--- +title: Messaging Channels +--- +![Chatbot Messaging](/img/docs/chatbot_messenger.png) + +Integrate your chatbot with various messaging channels. + +Click on the following links to know more about each channel integration. +1. [Messenger](./messaging-channels/../../messaging-channels/direct-integrations/facebook-messenger.md) +2. [Slack](./messaging-channels/../../messaging-channels/direct-integrations/slack.md) +3. [SunCo](./messaging-channels/../../messaging-channels/broker-integrations/sunco.md) +4. [Teams](./messaging-channels/../../messaging-channels/direct-integrations/microsoft-teams.md) +5. [Telegram](./messaging-channels/../../messaging-channels/direct-integrations/telegram.md) +6. [Twilio](./messaging-channels/../../messaging-channels/broker-integrations/twilio.md) +7. [Vonage](./messaging-channels/../../messaging-channels/broker-integrations/vonage.md) +8. [Webchat](./messaging-channels/../../messaging-channels/direct-integrations/facebook-messenger.md) \ No newline at end of file diff --git a/docs/management/misunderstood.md b/docs/management/misunderstood.md new file mode 100644 index 0000000..a7669d4 --- /dev/null +++ b/docs/management/misunderstood.md @@ -0,0 +1,47 @@ +--- +title: Misunderstood +--- + +![Messaging channels](/img/docs/chatbot_mis.png) +The misunderstood module holds information about the user messages that were misunderstood by the chatbot and it is available only for an activated bot. + +## How does it work? + +The chatbot determines that it didn't understand the user in three ways: + +1. Big ambiguity between two or more intents with nearly the same confidence when matching what the user said +2. When what the user said didn't match with any intent, a "none" intent is selected by the chatbot +3. The user clicked the "thumbs down" emoji on an elected Q&A + +## Continuous Learning + +By consulting the misunderstood module, you guarantee that your bot is continuously learning and growing. Once a user input is identified as misunderstood, you can either: + +- **Amend**: You can amend your intent(s) or QnA(s) utterances with what was not understood, or +- **Ignore**: You can choose to ignore a statement, so it is not logged again as misunderstood. + +## Automatic Utterance Clustering + +In order to make it easier for our builder (conversation designers, developers, etc.) we have added a new functionality in the misunderstood module, which is the automatic utterance clustering. When a builder click an utterance to take a decision about, the user statements are reordered to push all the matching/similar statements to the one the builder have chose. + +So for example, below are the misunderstood statements: + +![Misunderstood](/img/docs/chatbot_miss.png) + +We can see, food related statements are in the middle, when we select one of them, it is pushed up to the top along with other matching/similar statements. + +### Utterance operations: + +![Misunderstood](/img/docs/chatbot_miss3.png) + +- **Amend**: You can amend your intent(s) or QnA(s) utterances with what was not understood. +- **Ignore**: You can choose to ignore a statement, so it is not logged again as a misunderstood. +- **Revert**: And you can also **Revert** back to previous status. + +## Misunderstood Status + +The misunderstood messages split into 3 categories: + +1. **Pending**: Messages that must either be Ignored or Amended. +2. **Resolved**: Messages that have been Amended. +3. **Ignored**: Messages that have been Ignored. diff --git a/docs/management/overview.md b/docs/management/overview.md new file mode 100644 index 0000000..cc84ccb --- /dev/null +++ b/docs/management/overview.md @@ -0,0 +1,10 @@ +--- +title: Overview +--- + +# Chatbot Management +![Messaging channels](/img/docs/chatbot_management_banner.png) + + + +Get to know everything about configuring and managing your chatbots in Botpress Cloud \ No newline at end of file diff --git a/docs/messaging-channels/botpress-webchat/customizations/custom-css.md b/docs/messaging-channels/botpress-webchat/customizations/custom-css.md deleted file mode 100644 index 0a0815f..0000000 --- a/docs/messaging-channels/botpress-webchat/customizations/custom-css.md +++ /dev/null @@ -1,134 +0,0 @@ ---- -id: custom-css -title: Custom CSS ---- - --------------------- - -The Botpress webchat interface is fully customizable. You can change any of the styling using CSS. This can be done in two steps. - -1. Firstly create your own cascading style sheet and name it anything you want. Then, paste your stylesheet in the `/data/assets/modules/channel-web` folder. -2. Secondly, you need to reference your new style sheet to your integrated chatbot. You can easily do this by referencing your new stylesheet using the `extraStylesheet` property. - -Let us go through these steps in more detail. - -### Step 1 - Styling (CSS) - -Paste the following CSS file in the `/data/assets/modules/channel-web` folder. Feel free to change the style here. The original Botpress theme [can be found here](https://github.com/botpress/botpress/blob/master/modules/channel-web/assets/default.css). - -```css -.bpw-from-bot .bpw-chat-bubble { - background-color: #ececec; -} - -.bpw-chat-bubble:last-of-type { - border-bottom-right-radius: 20px; - border-bottom-left-radius: 20px; -} - -.bpw-chat-bubble:first-of-type { - border-top-left-radius: 20px; - border-top-right-radius: 20px; -} - -.bpw-from-user .bpw-chat-bubble:last-of-type { - border-bottom-right-radius: 0px; -} - -.bpw-from-bot .bpw-chat-bubble:last-of-type { - border-bottom-left-radius: 0px; -} - -.bpw-from-user .bpw-chat-bubble { - background-color: #4278f3; - color: #ffffff; -} - -.bpw-date-container .bpw-small-line { - border-bottom: none; -} - -.bpw-date-container { - font-weight: 700; - font-size: 14px; -} - -.bpw-header-container { - background-color: #f8f8f8; - border-bottom: none; -} - -.bpw-bot-avatar img, -.bpw-bot-avatar svg { - border: none; - border-radius: 50%; -} - -.bpw-composer { - padding: 10px; - background: none; - border: none; -} - -.bpw-composer textarea { - background: #ececec; - border-radius: 20px; - font-size: 1.25rem; - overflow: hidden; -} - -.send-btn { - position: absolute; - right: 30px; - bottom: 28px; - border: none; - border-radius: 5px; - background: #fff; - padding: 5px; - font-size: 14px; - font-weight: 500; - cursor: pointer; -} - -.send-btn:hover { - background: #d8d8d8; -} -``` - -### Step 2 - Loading CSS File - -Now, we need to instruct Botpress to use this custom CSS file for theming the webchat. For this, place the following code snippet in the `/data/global/hooks/after_bot_mount` folder. In our case, we used `01_create_shortlink.js` as the file name. - -```js -const chatOptions = { - hideWidget: true, - config: { - enableReset: true, - enableTranscriptDownload: true, - extraStylesheet: '/assets/modules/channel-web/chat.css' - } -} - -const params = { - m: 'channel-web', - v: 'Fullscreen', - options: JSON.stringify(chatOptions) -} - -setTimeout(() => { - try { - bp.http.deleteShortLink(botId) - } catch (e) {} - - // Chatbot will be available at $EXTERNAL_URL/s/$BOT_NAME - bp.http.createShortLink(botId, `${process.EXTERNAL_URL}/lite/${botId}/`, params) -}, 500) -``` - -Feel free to change the webchat config there. The critical line to keep is the `extraStylesheet` property. - -### Result - -Restart Botpress Server, and now your chatbot's default webchat will use your custom CSS theme! - -![WebChat Customization](/assets/webchat-customization.png) diff --git a/docs/messaging-channels/botpress-webchat/website-embedding/website-embedding.md b/docs/messaging-channels/botpress-webchat/website-embedding/website-embedding.md index 44336c7..350acf8 100644 --- a/docs/messaging-channels/botpress-webchat/website-embedding/website-embedding.md +++ b/docs/messaging-channels/botpress-webchat/website-embedding/website-embedding.md @@ -3,544 +3,15 @@ id: website-embedding title: Website Embedding --- ---- - -Integrating a chatbot to a website is relatively straightforward. As long as your chatbot is hosted on a physical or virtual server and is accessible via a URL, you can connect and integrate it to a website. Add the following script tag to the end of your `index.html` (or the default webpage, whichever it's named). - -:::tip -Don't forget to replace `` with the URL of your bot! -::: - -```html - -``` - -After the import script above, you need to locate and use the chatbot by initializing it to the `window` object: - -```html - -``` - -That's it! Once you add these changes and save them to your website, the bot will become available, and its button will appear on your site the next time you browse it. - -There is an example in the default botpress installation at `http://localhost:3000/assets/modules/channel-web/examples/embedded-webchat.html`. - -:::info -If your botpress instance and your webchat instance is not on the same domain. You need to add a header to your botpress instance. You can check the [content-security-policy](https://content-security-policy.com/frame-ancestors/) documentation to enable a cross-origin for the injector. - -- Nginx [example](https://content-security-policy.com/examples/nginx/) - -::: - -**Additional Option:** - -| Property | Description | -| -------- | ------------------------------------------------------------------------ | -| `ref` | The trusted reference of the user origin (generated by [security sdk][]) | - -## Bot Information Page - -The information page displays information like the website URL, a phone number, an e-mail contact address, and links to terms of services and privacy policies. You can also include a cover picture and an avatar for your bot. - -How to set up the information page: - -1. In the Admin, click the **Config** button next to the name of the bot you want to change. -2. Edit your bot information in the **More details** and **Pictures** sections. -3. Edit the file `data/global/config/channel-web.json` and set `showBotInfoPage` to `true`. -4. Refresh your browser. - -You will see the page when starting a new conversation. The page is always accessible by clicking on the information icon in the top right corner of the chat window. - -:::info -We edited the `global` configuration file for the sake of simplicity. To enable the bot information page on a single bot, visit that bot's studio UI and select **Config** (the last icon on the left-side menu with a cog). -::: - -## Events Available - -You can trigger events by calling the `window.botpressWebChat.sendEvent()` function. Below are some of them: - -| name | Description | -| --------------- | ----------------------------------------------------------------- | -| `show` | This event opens the webchat | -| `hide` | This event closes the webchat | -| `toggle` | This event open or close the webchat depends on its current state | -| `message` | This event sends a message (see example above) | -| `toggleBotInfo` | This event switches between bot infos and conversation page | - -### Show - -The following function shows the chat window when you click the `show-bp` element. - -```js -document.getElementById("show-bp").addEventListener("click", function () { - window.botpressWebChat.sendEvent({ type: "show" }) -}) -``` - -### Hide - -The following function hides the chat window when you click the `hide-bp` element. - -```js -document.getElementById("hide-bp").addEventListener("click", function () { - window.botpressWebChat.sendEvent({ type: "hide" }) -}) -``` - -### Changing Website Button - -Most developers change the default webchat button which comes pre-packed in Botpress. This is the button that appears on your website (in the bottom right corner) when you integrate your chatbot in your website. This common styling change is usually applied to adopt a button which fits into the website theme. If you would like to change the default Botpress button, pass the `hideWidget` key to your `init` function. By doing so, the default chat button will not show up on your website. - -```html - -``` - -You can then add a `click` event listener to any element on your web page (in most cases this entails creating a new button). Below is a code sample showing how to add event listeners to your custom elements. - -```html - -``` - -### Toggle - -The following function includes a ternary operator that toggles the chat to either be hidden or shown when you click the `toggle-bp` element. - -```js -document.getElementById("toggle-bp").addEventListener("click", function () { - window.botpressWebChat.sendEvent({ type: webchatOpen ? "hide" : "show" }) -}) -``` - -### Message - -The following function lets you programmatically send a message to the user when you click the `send-message-bp` element. - -```js -document - .getElementById("send-message-bp") - .addEventListener("click", function () { - window.botpressWebChat.sendEvent({ type: "message", text: "Hello!" }) - }) -``` - -## Runtime Configurations - -The method `window.botpressWebChat.configure` allows you to change the chat's configuration during a conversation without having to reload the page. - -The example below shows how you can change the chatbot's language to French when you click `change-lang-bp` on your website. - -```js -document - .getElementById("change-lang-bp") - .addEventListener("click", function () { - lastConfig.locale = "fr" - window.botpressWebChat.configure(lastConfig) - }) -``` - -### Configuring a Custom User ID - -Setting a value for `userId` in the webchat configuration allows you to store a custom id that can then be retrieved in actions and hooks. - -```js -lastConfig.userId = "7021eccd-6c4b-4f05-9cb5-f881c95b1781" // can be any string but make sure it is unique -window.botpressWebChat.configure(lastConfig) -``` - -To retrieve the value, you simply have to access the property `webchatCustomId` in the user's attributes. - -The example below shows how you can access the custom user ID inside an action or hook. - -```js -//... - -if (event.state.user.webchatCustomId) { - const customUserId = event.state.user.webchatCustomId - - // make an API or database call using the id - //... -} -``` - -### Sending Custom Payloads - -All messages sent to a user consist of a `payload`. That payload has a `type` property that tells the webchat how the payload should render on the screen. - -There are different ways to send that payload to the user: - -- Sending a content element via the Flow Editor [example here](https://github.com/botpress/botpress/blob/master/modules/builtin/src/content-types/image.js); -- Sending an event via [hooks or actions](https://github.com/botpress/botpress/blob/master/examples/custom-component/src/hooks/after_incoming_middleware/sendoptions.js). - -There are multiple types already built-in in Botpress (these are listed at the bottom of this page), but you can create them easily if you require more advanced components. - -### Prevent Storing Sensitive Information - -By default, the complete payload is stored in the database, so the information is not lost when the user refreshes the page. However, we may want to hide some properties deemed sensitive (such as password, credit card, etc.). - -To remove this information, there is a special property that you need to set: `sensitive`. Here's an example: - -```js -const payload = { - type: "login_prompt", - username: "someuser", - password: "abc123", - sensitive: ["password"], -} - -// This is the information that will be persisted: { type: 'login_prompt', username: 'someuser' } -``` - -### Changing Avatar for Messages - -If you need to display a different bot's avatar for some of the messages (like imitating changing author), you can achieve that by setting `botAvatarUrl` like this: - -```js -const payload = { - type: 'text', - botAvatarUrl: 'http://some.url' - text: 'Lorem ipsum' -} -``` - -## Creating a Custom Component - -We already have an [example module](https://github.com/botpress/botpress/tree/master/examples/custom-component) showing how to create them. We will make a quick recap here. The debugger is implemented entirely as a custom component in the [extensions module](https://github.com/botpress/botpress/tree/master/modules/extensions/src/views/lite/components/debugger), so don't hesitate to take a look at how it was implemented there. - -Custom components leverage the `custom` payload type, which allows you to inject any valid React component exported from a custom module. +![Messaging channels](/img/docs/webchat-banner.png) -1. Create a module (we have [example templates here](https://github.com/botpress/botpress/tree/master/examples/module-templates)). -2. Develop your component. -3. Export your component in the `lite.jsx` file ([here's a couple of different ways to do it](https://github.com/botpress/botpress/blob/master/examples/custom-component/src/views/lite/index.jsx)). -4. Send a custom payload to the user: - -```js -payload: { - type: "custom" // Important, this is how the magic operates - module: "myModule" // The name of your module, must match the one in package.json - component: "YourComponent" // This is the name of the component, exported from lite.jsx - // Feel free to add any other properties here, they will all be passed down to your component - myCustomProp1: "somemorestuff" - someOtherProperty: "anything" -} -``` - -### Component Properties - -A couple of properties are passed down to your custom component. These can be used to customize the displayed information and/or to pursue interactions. - -| Property | Description | -| ----------------- | ---------------------------------------------------------------------------- | -| `...props` | The payload properties are available on the root object (`this.props.`) | -| `onSendData` | This method can be used to send a payload to the bot on behalf of the user | -| `onFileUpload` | Instead of sending an event, this will upload the specified file | -| `sentOn` | This is the timestamp of the message. | -| `isLastGroup` | Indicates if your component is part of the group of messages sent by the bot | -| `isLastOfGroup` | Indicates if your component is the last message in its group | -| `keyboard` | This object allows you to manipulate the keyboard (more below) | -| `wrapped` | Represent any child components (more below) | -| `incomingEventId` | The ID of the incoming event which was processed | -| `store` | Grants access to the MOBX store of Channel Web (more on that below) | - -:::note -`isLastGroup` and `isLastOfGroup` can be combined to let your component know if the current message is the last one the user is seeing. This can be used, for example, to display feedback buttons, a login form, or anything else, that will disappear when the user continues the discussion. -::: - -### The Store - -The store orchestrates everything happening on the webchat: whether those buttons are displayed, which page is currently displayed, how to handle configuration changes, etc. This means that your component has a lot of flexibility. Here's a sample of the methods that you can use ([click here to see all of them](https://github.com/botpress/botpress/tree/master/modules/channel-web/src/views/lite/store)): - -- Hide or show the chat -- Add or remove header buttons -- Change the size of the chat window -- Send messages or payloads -- Create a new conversation -- Update any configuration option -- Set a wrapper that will wrap every single message (more on that below) - -Anything you can do while clicking on the UI can be done by your component. - -### Injecting Your Components - -Some components can be replaced by your own. There are also some placeholders that don't have any components, but you can inject yours. When you inject a component, it will receive the original component, so you can wrap it or change it completely. If there's a problem with your component, it will be replaced by the original one. - -| Location | Description | -| -------------------- | ------------------------------------------------------------------ | -| `below_conversation` | This component would be displayed just below the composer | -| `before_container` | This is displayed before the chat container (the debugger uses it) | -| `composer` | This allows you to replace the zone where the user is typing | - -How to configure them: - -```js -window.botpressWebChat.init({ -... - overrides: { - before_container: [ - { - module: 'extensions', - component: 'Debugger' - } - ] - } -}) -``` - -### Wrappers - -Wrappers allow you to transform a payload's content before passing it down to the renderer or another component. We have some [example components here](https://github.com/botpress/botpress/tree/master/examples/custom-component/src/views/lite/components/Advanced.jsx). - -Here's an example of a wrapped text message: - -```js -payload: { - type: 'custom', - module: 'myModule', - component: 'MyComponent' - wrapped: { - type: 'text' - text: 'Hello user!' - } -} -``` - -It is also possible to chain multiple custom components using the `wrapped` property. - -### Keyboards - -The keyboard allows you to add elements before or after the composer. Keyboard items can be buttons or any other type of valid component. Use `Keyboard.Prepend` to display it before the composer, and `Keyboard.Append` to display it after. - -```js -... -render(){ - // First of all, import the keyboard object - const Keyboard = this.props.keyboard - - // Create any type of component - const something =
This will be displayed over the composer, as long as visible is true
- - // Your custom keyboard will only be displayed if that message is the last one displayed - const visible = this.props.isLastGroup && this.props.isLastOfGroup - - return ( - - This text will be displayed in the chat window - à - ) -} -``` - -### Using a Button Keyboard - -There is a built-in hook that makes it easy to add buttons to any element. You can pass down an array of buttons or an array of array of buttons. - -```js -const payload = { - type: 'text' - text: 'hello', - quick_replies: [ - [{ label: 'row 1, button 1', payload: 'something' }, { label: 'row 1, button 2', payload: 'something' }], - [{ label: 'row 2, button 1', payload: 'something' }], - [{ label: 'row 3, button 1', payload: 'something' }] - ] -} -``` - -[security sdk]: https://botpress.com/reference/modules/_botpress_sdk_.security.html#getmessagesignature - -## Acting Proactively - -You may wish to make your bot act proactively on your website in response to some action, such as making the bot speak first, suggesting they buy the product, or asking them for feedback on services they were using. - -### Send an Event From the Webpage - -First you need to open the webchat (either manually or programmatically) and then send an event from the webpage. - -```js -window.botpressWebChat.sendEvent({ - type: "proactive-trigger", - channel: "web", - payload: { - text: "fake message", - }, -}) -``` - -The property `type: 'proactive-trigger'` is used to identify the event so we can catch it and act on it later on. - -### Catch the Event in a Hook - -This event will be dispatched to the bot so you need to add a handler for it. If this event is not handled, it will be interpreted as a user message. - -This snippet should be added to the `before_incoming_middleware` hook: - -```js -// Catch the event sent from the webpage -if (event.type === "proactive-trigger") { - // You custom code -} -``` +1. Make sure you've [published your chatbot](/quickstart/publishing-your-chatbot) to botpress cloud dashboard. +2. Go to your published chatbot and select `Web Chat` option under `Channels` tab. +3. Copy the Preconfigured URL script and paste it in the `` tag of your HTML page. +(Optional) Moreover, click on the `Custom Configuration` tab if you want to customize the webchat configurations. +![Messaging channels](/img/docs/custom-config.png) + \ No newline at end of file diff --git a/docs/messaging-channels/broker-integrations/smooch-sunshine-conversations.md b/docs/messaging-channels/broker-integrations/smooch-sunshine-conversations.md deleted file mode 100644 index c2b3a92..0000000 --- a/docs/messaging-channels/broker-integrations/smooch-sunshine-conversations.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -id: smooch-sunshine-conversations -title: Smooch (Sunshine Conversations) ---- - ---- - -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; - -import SmoochLocal from './smooch/local.md' -import SmoochCloud from './smooch/cloud.md' - - - - - - - - - diff --git a/docs/messaging-channels/broker-integrations/smooch/local.md b/docs/messaging-channels/broker-integrations/smooch/local.md deleted file mode 100644 index 6d5b7b7..0000000 --- a/docs/messaging-channels/broker-integrations/smooch/local.md +++ /dev/null @@ -1,55 +0,0 @@ -## Requirements - -- An HTTPS Endpoint to your chatbot: - - - Set the `externalUrl` field in `botpress.config.json`; - - Create an HTTPS tunnel to your machine using Ngrok ([tutorial](https://api.slack.com/tutorials/tunneling-with-ngrok)); - - Using Nginx and Let's Encrypt ([tutorial](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04)). - -- A [smooch.io](https://smooch.io/) account (you will need a business email). - -## Setup - -### Smooch App - -1. On the `app.smooch.io` home page, click on **Create new app.** - -2. Enter a name for your app and click **Create App**. - -3. Connect a channel to your app (Telegram, Whatsapp, or any other listed channel). - -4. You should see a channel in the **Overview** section of your app. - -### Botpress Connection - -1. Go to the **Settings** section of your app. - -2. At the bottom, you will find an **API Keys** menu. Create a new API key. - -3. You will need the `id` (the one that starts with app) and `secret` key to setup your bot. -4. Edit `data/bots//bot.config.json`. -5. In the `messaging.channels.smooch` section write this configuration: - -- `enabled`: set to `true`; -- `keyId`: paste the `id` of your key from the `Settings` section; -- `secret`: paste the `secret` of your key from the `Settings` section. - - Your `bot.config.json` should look like this: - -```json -{ - // ... other data - "messaging": { - "channels": { - "smooch": { - "enabled": true, - "keyId": "your_key_id", - "secret": "your_secret" - } - // ... other channels can also be configured here - } - } -} -``` - -1. Restart Botpress and test if your chatbot has been successfully connected to your desired channel. diff --git a/docs/messaging-channels/broker-integrations/smooch/cloud.md b/docs/messaging-channels/broker-integrations/sunco.md similarity index 94% rename from docs/messaging-channels/broker-integrations/smooch/cloud.md rename to docs/messaging-channels/broker-integrations/sunco.md index 072b009..7183d70 100644 --- a/docs/messaging-channels/broker-integrations/smooch/cloud.md +++ b/docs/messaging-channels/broker-integrations/sunco.md @@ -1,3 +1,9 @@ +--- +id: sunco +title: Sunshine Conversations +--- + +![Messaging channels](/img/docs/smooch-banner.png) ## Requirements You will need a Smooch app with a channel configured before connecting Smooch to Botpress diff --git a/docs/messaging-channels/broker-integrations/twilio.md b/docs/messaging-channels/broker-integrations/twilio.md index 4e33ba4..de7585c 100644 --- a/docs/messaging-channels/broker-integrations/twilio.md +++ b/docs/messaging-channels/broker-integrations/twilio.md @@ -3,19 +3,32 @@ id: twilio title: Twilio --- ---- +![Messaging channels](/img/docs/twilio-banner.png) + +## Requirements + +Create a Twilio account and purchase a Twilio phone number + +## Channel Configuration + +### Account SID and Auth Token + +1. Go to you Twilio [console dashboard](https://console.twilio.com/?frameUrl=/console) +1. Scroll down and copy your Account SID and Auth Token from the **Project Info** section and paste them in the **Account SID** and **Auth Token** channel configurations + +### Save Configuration + +Channel configuration is complete, you can now click **Save** -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +## Webhook Configuration -import TwilioLocal from './twilio/local.md' -import TwilioCloud from './twilio/cloud.md' +To receive messages from Twilio, you will need to setup a webhook - - - - - - - - +1. Click on **Explore Products** in the left pannel +1. Click on **Messaging** +1. Click on **Services** in the left pannel +1. Click on your service (if you haven't already created your service, create a messaging service and add your phone as a sender) +1. Click on **Sender Pool** in the left pannel +1. Click on your phone number +1. Scroll down the phone number settings page +1. Copy paste the webhook url provided in the channel configuration UI to the **A Message Comes In** field diff --git a/docs/messaging-channels/broker-integrations/twilio/cloud.md b/docs/messaging-channels/broker-integrations/twilio/cloud.md deleted file mode 100644 index 16cc715..0000000 --- a/docs/messaging-channels/broker-integrations/twilio/cloud.md +++ /dev/null @@ -1,27 +0,0 @@ -## Requirements - -Create a Twilio account and purchase a Twilio phone number - -## Channel Configuration - -### Account SID and Auth Token - -1. Go to you Twilio [console dashboard](https://console.twilio.com/?frameUrl=/console) -1. Scroll down and copy your Account SID and Auth Token from the **Project Info** section and paste them in the **Account SID** and **Auth Token** channel configurations - -### Save Configuration - -Channel configuration is complete, you can now click **Save** - -## Webhook Configuration - -To receive messages from Twilio, you will need to setup a webhook - -1. Click on **Explore Products** in the left pannel -1. Click on **Messaging** -1. Click on **Services** in the left pannel -1. Click on your service (if you haven't already created your service, create a messaging service and add your phone as a sender) -1. Click on **Sender Pool** in the left pannel -1. Click on your phone number -1. Scroll down the phone number settings page -1. Copy paste the webhook url provided in the channel configuration UI to the **A Message Comes In** field diff --git a/docs/messaging-channels/broker-integrations/twilio/local.md b/docs/messaging-channels/broker-integrations/twilio/local.md deleted file mode 100644 index a6f9666..0000000 --- a/docs/messaging-channels/broker-integrations/twilio/local.md +++ /dev/null @@ -1,51 +0,0 @@ -## Prerequisite - -- An HTTPS Endpoint to your bot - - - Set the externalUrl field in `botpress.config.json`. - - Create an HTTPS tunnel to your machine using Ngrok. - - Using Nginx and Let's Encrypt. - -- Create a Twilio account and create a phone number - -### Get your API Credentials - -1. Go to you Twilio console dashboard. -2. Go to the settings tab. -3. Scroll down and copy your Account SID and Auth Token from the LIVE credentials section. - -### Configure Your Bot - -1. Edit `data/bots//bot.config.json`. In the `messaging.channels.twilio` section write this configuration: - -- `enabled`: set to `true` -- `accountSID`: paste your account SID -- `authToken`: paste your auth token - - Your `bot.config.json` should look like this: - -```json -{ - // ... other data - "messaging": { - "channels": { - "twilio": { - "enabled": true, - "accountSID": "your_account_sid", - "authToken": "your_auth_token" - } - // ... other channels can also be configured here - } - } -} -``` - -2. Restart Botpress. -3. You should see your webhook endpoint in the console on startup. - -### Configure Webhook - -1. Go to the phone numbers section and click **Manage**, then **Active Numbers**. -2. Click on your registered phone number. If you don't have one, click **Buy a new number**. -3. Scroll down to the messaging webhook section. -4. Set 'A Message Comes In' to `/api/v1/messaging/webhooks/ - - - - - - - +1. Check the **Use Testing API** box in your channel configuration +1. Go to your [Sandbox Settings](https://dashboard.nexmo.com/messages/sandbox) +1. Copy paste the webhook url provided in the channel configuration UI to the **Inbound** and **Status** fields in the **Webhooks** section diff --git a/docs/messaging-channels/broker-integrations/vonage/cloud.md b/docs/messaging-channels/broker-integrations/vonage/cloud.md deleted file mode 100644 index abdfa4b..0000000 --- a/docs/messaging-channels/broker-integrations/vonage/cloud.md +++ /dev/null @@ -1,33 +0,0 @@ -# Vonage - -## Requirements - -### Create Vonage Application - -You will need a Vonage Account and a Vonage Application to connect Vonage to Botpress - -- [Create a Vonage Account](https://dashboard.nexmo.com/sign-up) -- [Create a Vonage Application](https://dashboard.nexmo.com/applications/new) - -## Channel Configuration - -### API credentials - -1. Go to your [API Settings](https://dashboard.nexmo.com/settings). -1. Copy paste the API key to the **API Key** channel configuration -1. Copy paste the API secret from the **Account credentials** section to the **API Secret** channel configuration -1. Copy paste the signature secret from the **Signed webhooks** section to the **Signature Secret** channel configuration - -### Save Configuration - -Channel configuration is complete, you can now click **Save** - -## Webhook Configuration - -### Sandbox - -You can use the Vonage sandbox to test you channel with Whatsapp - -1. Check the **Use Testing API** box in your channel configuration -1. Go to your [Sandbox Settings](https://dashboard.nexmo.com/messages/sandbox) -1. Copy paste the webhook url provided in the channel configuration UI to the **Inbound** and **Status** fields in the **Webhooks** section diff --git a/docs/messaging-channels/broker-integrations/vonage/local.md b/docs/messaging-channels/broker-integrations/vonage/local.md deleted file mode 100644 index 15f9836..0000000 --- a/docs/messaging-channels/broker-integrations/vonage/local.md +++ /dev/null @@ -1,83 +0,0 @@ -## Prerequisite - -- An HTTPS Endpoint to your bot - - - Set the externalUrl field in `botpress.config.json` - - Create an HTTPS tunnel to your machine using Ngrok. Tutorial - - Using Nginx and Let's Encrypt. Tutorial - -- [Create a Vonage Account](https://dashboard.nexmo.com/sign-up) -- [Create a Vonage Application](https://dashboard.nexmo.com/applications/new) - - - Give it a name - - Under `Authentication`, click **Generate public and private key** (this will download a file called `private.key`. You will need this file later on.) - - Click **Generate new application** - -### Get your API credentials - -1. Go to your [Account Settings](https://dashboard.nexmo.com/settings). -2. Scroll down and copy your API key, API secret and Signature secret from the LIVE credentials section. -3. Go to your applications and select your newly created application (https://dashboard.nexmo.com/applications/). -4. Copy the Application ID. - -### Configure your bot - -1. Edit `data/bots//bot.config.json`. In the `messaging.channels.vonage` section write this configuration: - -- `enabled`: set to `true`; -- `apiKey`: paste your API key; -- `apiSecret`: paste your API Secret; -- `signatureSecret`: paste your Signature secret; -- `applicationId`: paste your Application ID; -- `privateKey`: paste the content of the `private.key` file that was generated when you created your Vonage Application; - - Paste the full key value, including the `-----BEGIN PRIVATE KEY-----` and `-----END PRIVATE KEY-----` lines; - - Replace all line breaks with the newline character `\n`; -- `useTestingApi (optional)`: set to `true` if you want to use the `Sandbox` instead of the `Live` version of Vonage API (see [Setup a Messages Sandbox](#Setup%20a%20Messages%20Sandbox)). - - Your `bot.config.json` should look like this: - -```json -{ - // ... other data - "messaging": { - "channels": { - "vonage": { - "enabled": true, - "apiKey": "your_api_key", - "apiSecret": "your_api_secret", - "signatureSecret": "your_signature_secret", - "applicationId": "your_application_id", - "privateKey": "your_private_key", - "useTestingApi": false - } - // ... other channels can also be configured here - } - } -} -``` - -2. Restart Botpress. -3. You should see your webhook endpoint in the console on startup. - -### Setup a Messages Sandbox - -When wanting to test the integration with Vonage and WhatsApp, you need to enable a Sandbox where you can send test messages. - -1. In the left end side menu of [Vonage Dashboard](https://dashboard.nexmo.com/) select **Messages and Dispatch (beta)** -1. Click **Sandbox**. -1. Click the channel you want to setup and follow the instructions detailed on the page. -1. Under `Webhooks`, type the following URLs: - - _Inbound:_ `/api/v1/messaging/webhooks//vonage/inbound` - - _Status:_ `/api/v1/messaging/webhooks//vonage/status` - -## File Reception - -Vonage currently supports receiving `image` , `audio`, `video`, `file` , and `location`. - -:::note -Please, keep in mind that the links coming from the Vonage API are only valid for 10 minutes. -::: - -An action (Storage - Store File Locally) is available in order to store the file locally. diff --git a/docs/messaging-channels/custom-channels/converse-api.md b/docs/messaging-channels/custom-channels/converse-api.md deleted file mode 100644 index 8bcc193..0000000 --- a/docs/messaging-channels/custom-channels/converse-api.md +++ /dev/null @@ -1,205 +0,0 @@ ---- -id: converse-api -title: Converse API ---- - ---- - -The Converse API skill helps you quickly call an API within your flow. You can then save and use the responses received from the external API in your chatbot's code and flows. - -## Request Options - -Calling an API involves making an HTTP request from Botpress to a named host on a server. The request aims to access a resource on the server. The following are the components of your request through which you will supply information to an API. - -### Body - -The request body is set in the interface below. Please ensure that your request body adheres to the specified syntax for the API you are calling. - -### Headers - -The request headers can be set here and should respect the JSON format. - -## Response - -All APIs respond to every request with an HTTP status indicating whether the request was successful. The response typically comes along with a JSON response which may contain additional information. The Call API skill supports receipt and storage of this response in the following manner. - -### Memory - -We use [memory](/building-chatbots/memory-&-data-persistence/flow-memory) to save the response given by the API we are calling. By default, Botpress will save the response in `temp.response`, but you can use the memory of your choice according to the use-case. - -The saved response object looks like this: - -```json -{ - "body": , - "status": 200 -} -``` - -### Success / Failure - -When a response returns a status code `400` and above, the request will fail and execute the `On failure` transition. All other status codes will result in success and execute the `On success` transition. - -## Templating - -Botpress supports templating in the `body` and the `headers` to access variables stored in [memory](/building-chatbots/memory-&-data-persistence/flow-memory). All `bot`, `user`, `session`, `temp`, and `event` memory types are accessible via templating. - -## Debug API - -There's also a secured route that requires authentication to Botpress to consume this API. Using this route, you can request more data to be included in your response using the `include` query params separated by commas. - -### JWT Token - -To access this route, you need a JWT token. This requirement is in place because sensitive information destined for the chatbot back-end user is accessible via this route. For example, you can access the chatbot's decision logic. - -#### Request - -Here is a sample request using cURL to get this token: - -```js -curl --location --request POST 'http:///api/v1/auth/login/basic/default' \ ---header 'Content-Type: application/json' \ ---data-raw '{ - "email": "", - "password": "" -}' -``` - -#### Response - -In the response, you can find the JWT token and its expiration. The expiration can be configured globally using the `jwtToken.duration` field in the `botpress.config.json` file. This duration will apply to all generated JWT tokens (this applies to all users logging into Botpress). - -The response body from the above request will look like this: - -```json -{ - "status": "success", - "message": "Login successful", - "payload": { - "jwt": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImFkbWtsoiwic3RyYXRlZ3kiOiJkZWZhdWx0IiwidG9rZW5WZXJzaW9uIjoxLCJpc1N1cGVyQWRtaW4iOnRydWUsImlhdCI6MTYxODU3Mjk1MCwiZXhwIjoxNjE4NTc2NTUwLCJhsdwiOiJjb2xsYWJvcmF0b3JzIn0.urYZ5A8yXH3XqzSmu7GmImufSgZ0Nx6HknzuidGWnRs", - "exp": 3600000 - } -} -``` - -## API Request - -### Headers - -To call the Converse API on the `/secured` path, you will need to include a `Content-Type` and an `Authorization` header in the POST request as follows: - -```json -{ - "Content-Type": "application/json", - "Authorization": "Bearer {token}" -} -``` - -Where {token} is the JWT token provided by Botpress as described above. - -### Request URL - -When calling the debug API, you can get the following options in addition to the standard response. - -- **nlu**: the output of Botpress NLU -- **state**: the state object of the user conversation -- **suggestions**: the reply suggestions made by the modules -- **decision**: the final decision made by the Decision Engine - -A sample request URL is: - -```json -POST /api/v1/bots/{botId}/converse/{userId}/secured?include=nlu,state,suggestions,decision - -{ - "type": "text", - "text": "", - "includedContexts": ["global"], // optional, for NLU context - "metadata": {} // optional, useful to send additional data for custom hooks -} -``` - -## API Response - -Below is a sample of the response given by our support bot at Botpress when it's the first time you chat with it using the converse API with all debug options included. - -```json -{ - "responses": [ - { - "type": "typing", - "value": true - }, - { - "type": "text", - "markdown": true, - "text": "Hey there, welcome to **Botpress Support**!" - } - ], - "nlu": { - "entities": [], - "language": "n/a", - "ambiguous": false, - "slots": {}, - "intent": { - "name": "none", - "confidence": 1, - "context": "global" - }, - "intents": [], - "errored": false, - "includedContexts": ["global"], - "ms": 0 - }, - "suggestions": [], - "state": { - "__stacktrace": [ - { - "flow": "main.flow.json", - "node": "entry" - }, - { - "flow": "main.flow.json", - "node": "node-aedb" - } - ], - "user": { - "0": "{", - "1": "}" - }, - "context": {}, - "session": { - "lastMessages": [ - { - "eventId": "2614565289899183", - "incomingPreview": "Hie", - "replyConfidence": 1, - "replySource": "dialogManager", - "replyDate": "2021-04-29T15:43:47.061Z", - "replyPreview": "#!builtin_text-VahTGK" - } - ], - "workflows": {}, - "slots": {} - }, - "temp": {} - }, - "decision": { - "decision": { - "reason": "no suggestion matched", - "status": "elected" - }, - "confidence": 1, - "payloads": [], - "source": "decisionEngine", - "sourceDetails": "execute default flow" - } -} -``` - -## Caveats - -Please note that for now, this API can't: - -- Be used to receive proactive messages (messages initiated by the bot instead of the user); -- Be disabled, throttled, or restricted. diff --git a/docs/messaging-channels/direct-integrations/facebook-messenger.md b/docs/messaging-channels/direct-integrations/facebook-messenger.md index a9c8ce1..1b136ca 100644 --- a/docs/messaging-channels/direct-integrations/facebook-messenger.md +++ b/docs/messaging-channels/direct-integrations/facebook-messenger.md @@ -3,19 +3,81 @@ id: facebook-messenger title: Facebook Messenger --- ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +![Messaging channels](/img/docs/messenger-banner.png) + +## Requirements + +You will need a Facebook app and a Facebook page to connect you bot to messenger. + +### Enabling Messenger in Botpress Cloud Dashboard + +Go to the chatbot settings in your cloud dashboard and enable messenger. +We will get the APP ID, App Secret, Verify Token, Page ID and Access Token from the following steps. + +### Create a Facebook App + +To create a Facebook App, log in to your Facebook account and go to the [Facebook for Developers website](https://developers.facebook.com/). Select **My Apps** from the top menu, and create a new app. For more details and assistance, visit the [Facebook developer documentation](https://developers.facebook.com/docs/development) + +### Create a Facebook Page + +If you do not already have a Facebook page you will need to create one. [You can find details on how to create a new Facebook page here](https://www.facebook.com/pages/creation/) + +To link your chatbot to a pre-existing page, you must have an administrator or developer role + +## Channel Configuration + +### API version + +The messenger channel is made to interact with version 12.0 or higher of the Messenger API. It is not the default version so it must be changed in your app's settings + +1. Go to your Facebook App +1. In the left sidebar, expand the **Settings** menu and select **Advanced** +1. In the **Upgrade API version** section, select v12.0 or higher as the API version +1. Click on **Save changes** + + + +### Add Messenger Product + +Messenger is not added by default in your Facebook App, so it must be added manually + +1. In the left sidebar, click on **Add Product** +1. In the Facebook Messenger section click **Set Up** +### App ID and App Secret + +The App ID and secret are used to validate webhook requests + +1. In the left sidebar, expand the **Settings** menu and select **Basic**. Here you can find the App ID and App Secret. +1. Click on the **Show** button in the **App Secret** text box. Copy the App ID and App Secret to your messenger configuration in the Cloud Dashboard. + +### Page ID and Access Token + +The page ID and access token are used to send messages to the Messenger API + +1. In the left sidebar, expand the **Messenger** menu and select **Settings** +1. In the **Access Tokens** section, click **Add or remove Pages** and add you facebook page +1. Copy the number under you page name and paste it in you **Page Id** channel configuration +1. Click on **Generate token**. Copy this token and paste it in the **Access Token** channel configuration in cloud dashboard. + +### Verify Token + +The Verify Token is used by facebook to verify that you are the real owner of the provided webhook. + +You can generate any random alphanumerical string for this configuration. Paste it in your **Verify Token** channel configuration. + +### Save Configuration + +Channel configuration is complete, you can now click **Save**. It is important you save your configuration before configuring the webhook, otherwise Messenger will be unable to validate the webhook url. + +## Webhook Configuration -import FacebookLocal from './facebook/local.md' -import FacebookCloud from './facebook/cloud.md' +To receive messages from Messenger, you will need to setup a webhook. - - - - - - - - +1. Go to your Facebook App. +1. In the left sidebar, expand the **Messenger** menu and select **Settings** +1. In the **Webhooks** section, click **Add Callback URL** +1. Copy paste the webhook url provided in the channel configuration UI from cloud dashboard. +1. Copy paste the verify token you generated earlier. +1. Click on **Verify and save**. Make sure your channel configuration was saved before doing this step, otherwise the webhook validation will fail. +1. Click on **Add subscriptions** and add `messages` and `messaging_postbacks` to your webhook. diff --git a/docs/messaging-channels/direct-integrations/facebook/cloud.md b/docs/messaging-channels/direct-integrations/facebook/cloud.md deleted file mode 100644 index 074d2ca..0000000 --- a/docs/messaging-channels/direct-integrations/facebook/cloud.md +++ /dev/null @@ -1,69 +0,0 @@ -## Requirements - -You will need a Facebook app and a Facebook page to connect you bot to messenger - -### Create a Facebook App - -To create a Facebook App, log in to your Facebook account and go to the [Facebook for Developers website](https://developers.facebook.com/). Select **My Apps** from the top menu, and create a new app. For more details and assistance, visit the [Facebook developer documentation](https://developers.facebook.com/docs/development) - -### Create a Facebook Page - -If you do not already have a Facebook page you will need to create one. [You can find details on how to create a new Facebook page here](https://www.facebook.com/pages/creation/) - -To link your chatbot to a pre-existing page, you must have an administrator or developer role - -## Channel Configuration - -### API version - -The messenger channel is made to interact with version 12.0 or higher of the Messenger API. It is not the default version so it must be changed in your app's settings - -1. Go to your Facebook App -1. In the left sidebar, expand the **Settings** menu and select **Advanced** -1. In the **Upgrade API version** section, select v12.0 or higher as the API version -1. Click on **Save changes** - -### Add Messenger Product - -Messenger is not added by default in your Facebook App, so it must be added manually - -1. In the left sidebar, click on **Add Product** -1. In the Facebook Messenger section click **Set Up** - -### App Id and Secret - -The app id and secret are used to validate webhook requests - -1. In the left sidebar, expand the **Settings** menu and select **Basic**. Here you can find the App ID and App Secret -1. Click on the **Show** button in the **App Secret** text box. Copy the App Id and App Secret to your channel configuration - -### Page Id and Access Token - -The page id and access token are used to send messages to the Messenger API - -1. In the left sidebar, expand the **Messenger** menu and select **Settings** -1. In the **Access Tokens** section, click **Add or remove Pages** and add you facebook page -1. Copy the number under you page name and paste it in you **Page Id** channel configuration -1. Click on **Generate token**. Copy this token and paste it in the **Access Token** channel configuration - -### Verify Token - -The verify token is used by facebook to verify that you are the real owner of the provided webhook - -You can generate any random alphanumerical string for this configuration. Paste it in your **Verify Token** channel configuration - -### Save Configuration - -Channel configuration is complete, you can now click **Save**. It is important you save your configuration before configuring the webhook, otherwise Messenger will be unable to validate the webhook url - -## Webhook Configuration - -To receive messages from Messenger, you will need to setup a webhook - -1. Go to your Facebook App. -1. In the left sidebar, expand the **Messenger** menu and select **Settings** -1. In the **Webhooks** section, click **Add Callback URL** -1. Copy paste the webhook url provided in the channel configuration UI -1. Copy paste the verify token you generated earlier -1. Click on **Verify and save**. Make sure your channel configuration was saved before doing this step, otherwise the webhook validation will fail -1. Click on **Add subscriptions** and add `messages` and `messaging_postbacks` to your webhook diff --git a/docs/messaging-channels/direct-integrations/facebook/local.md b/docs/messaging-channels/direct-integrations/facebook/local.md deleted file mode 100644 index 643bffe..0000000 --- a/docs/messaging-channels/direct-integrations/facebook/local.md +++ /dev/null @@ -1,180 +0,0 @@ -## Requirements - -Messenger requires you to have a Facebook App and a Facebook Page to connect your chatbot to their platform. - -### Create a Facebook App - -To create a Facebook App, log in to your Facebook account and ensure you have admin rights for the Facebook page to which you want to connect your chatbot. - -After that, go to the [Facebook for Developers website](https://developers.facebook.com/), select **My Apps** from the top menu, and create a new app. For more details and assistance, visit the [Facebook developer documentation](https://developers.facebook.com/docs/development) - -### Create a Facebook Page - -You require if you do not already have a Facebook page to link your chatbot. [You can find details on how to create a new Facebook page here](https://www.facebook.com/pages/creation/). - -To link your chatbot to a pre-existing page, you must have an administrator or developer role. - -### HTTPS Endpoint to Your Chatbot - -Facebook only integrates its apps and services to secured endpoints. Below are tutorials to help you create an HTTPS endpoint if you do not have one: - -- Create an HTTPS tunnel to your machine using Ngrok ([Tutorial](https://api.slack.com/tutorials/tunneling-with-ngrok)). -- Using Nginx and Let's Encrypt. This tutorial bases on the Linux Ubuntu 16.04 Operating System. [**Tutorial**](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04). -- Create an HTTPS tunnel to your machine using Serveo ([Tutorial](https://medium.com/automationmaster/how-to-forward-my-local-port-to-public-using-serveo-4979f352a3bf)). - -#### App Secret - -1. Go to your Facebook App. -1. In the left sidebar, expand the **Settings** menu and select **Basic**. Here you can find the App ID and App Secret. -1. Click on the **Show** button in the **App Secret** text box. You can copy the App ID and App Secret to use for your Facebook API calls. - -#### Verify Token - -Set a long string of your own making as a verify token or use a random string generator service like `random.org` to create a verify token. - -## Configurations - -The following configurations are required for a connection, enabling you to access your chatbot from your Facebook page. - -While the first three are mandatory, the last three configurations (greeting text, get started, and persistent menu) are not. - -### Botpress HTTPS Endpoint - -- Set the following properties: - - - `appSecret`. You will find this value on your Facebook App page. - - `verifyToken`. Use a preferably long and cryptic random string and keep it secret. You'll need to copy and paste this token in the Facebook App portal when setting up your webhook. - -- Make sure you have an HTTPS URL pointing to your Botpress Server and set the `EXTERNAL_URL` environment variable as follows: - - Open `data/global/botpress.config.json` and set the value of the `httpServer.externalUrl` configuration variable to the complete hostname of your HTTPS endpoint, for example, `https://bot.botpress.com`. The resulting file should be as below: - -```json - { - "$schema": "../botpress.config.schema.json", - "httpServer": { - "host": "localhost", - "port": 3000, - "backlog": 0, - "bodyLimit": "10mb", - "cors": { - "enabled": true - }, - "externalUrl": "https://bot.botpress.com", -``` - -- Restart Botpress Server to reload the configuration. - -### Individual Chatbot Configuration - -Edit `data/bots//bot.config.json`. In the `messaging.channels.messenger` section write this configuration : - -- `accessToken` has to be set to your page access token. To obtain this token: - 1. Go to products in your Facebook App Dashboard's left sidebar. - 1. Add Messenger, you should see it added to the left sidebar. - 1. Select settings under the sidebar menu item. - 1. Add a Facebook page you manage to your App. - 1. You should see a generate token button. Click and copy that token to the `json` file. -- `enabled` has to be set to `true` -- `appSecret`. You will find this value on your Facebook App page. - - Go to Settings then Basic. Click show and get your app secret. -- `verifyToken`. A secret random string. See the [webhook](#Facebook Webhook) section for details on how to configure your Webhook. - -Your `bot.config.json` should look like this : - -```json -{ - // ... other data - "messaging": { - "channels": { - "messenger": { - "enabled": true, - "accessToken": "your_access_token", - "appSecret": "your_app_secret", - "verifyToken": "your_verify_token" - } - // ... other channels can also be configured here - } - } -} -``` - -:::caution -One bot is connected to **one** facebook page. -::: - -### Facebook Webhook - -Messenger will use a webhook that you'll need to register to communicate with your chatbot. - -1. In your Facebook app, click Products. -1. Click **Messenger**. -1. Go in the **Settings**. -1. Click **Webhooks**, then **Setup Webhooks**. -1. Under Callback URL, enter `/api/v1/messaging/webhooks/" -``` - -The **Get Started** button will allow you to send a pro-active message to your chat with the user. The Page Messenger welcome screen displays this **Get Started** button. When clicked, this button the Messenger Platform will send a `messaging_postbacks` event to your webhook. You can also configure a greeting message after you add the **Get Started** button. - -Read more about [get started](https://developers.facebook.com/docs/messenger-platform/reference/messenger-profile-api/get-started-button). - -### Persistent Menu - -The persistent menu allows you to have an always-on user interface element inside Messenger conversations. It is an easy way to help people discover and access your Messenger chatbot's core functionality at any point in the conversation. - -Read more about persistent menu [here](https://developers.facebook.com/docs/messenger-platform/send-messages/persistent-menu). - -:::note -The persistent menu is cached locally on the user's client, with updates fetched periodically. If you change the persistent menu, it can take some time for the menu to update. You can force a refresh by deleting the conversation and starting a new one. -::: - -**Persistent Menu object example**: - -```json - "persistentMenu": [ - { - "locale": "default", - "call_to_actions": [ - { - "title": "My Account", - "type": "nested", - "call_to_actions": [ - { - "title": "Pay Bill", - "type": "postback", - "payload": "PAYBILL_PAYLOAD" - }, - { - "type": "web_url", - "title": "Latest News", - "url": "https://www.messenger.com/", - "webview_height_ratio": "full" - } - ] - } - ] - } - ] -``` diff --git a/docs/messaging-channels/direct-integrations/microsoft-teams.md b/docs/messaging-channels/direct-integrations/microsoft-teams.md index c42e818..c6d829b 100644 --- a/docs/messaging-channels/direct-integrations/microsoft-teams.md +++ b/docs/messaging-channels/direct-integrations/microsoft-teams.md @@ -3,19 +3,38 @@ id: microsoft-teams title: Microsoft Teams --- ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +![Messaging channels](/img/docs/teams-banner.png) + +## Requirements + +### Configure Microsoft Account + +Your Microsoft Account should have access to Azure and Teams. You can check out the [Azure](https://docs.microsoft.com/en-us/azure/devops/?view=azure-devops) and [Teams](https://docs.microsoft.com/en-us/microsoftteams/) documentation for information on how to make these connections + +## Channel Configuration + +### Register App + +1. In the Azure portal, open the [App registrations](https://portal.azure.com#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) page +1. Click **New registration**, then choose a name for your application +1. In the section **Supported account types**, choose **Accounts in any organizational directory and personal Microsoft accounts**, then click **Register** +1. Copy paste the value of `Application (client) ID` to the **App Id** channel configuration + +### App Password + +1. Click **Certificates & secrets**, then click **New client secret**, then fill in the required fields +1. Copy paste the the value in the **Value** column to the **App Secret** channel configuration + +### Save Configuration + +Channel configuration is complete, you can now click **Save** -import TeamsLocal from './teams/local.md' -import TeamsCloud from './teams/cloud.md' +## Create Your Bot - - - - - - - - +1. Navigate to the [Bot Framework Registration Page](https://dev.botframework.com/bots/new) +1. Fill the **Display name** and **Bot handle** fields with whatever value +1. Copy paste you **App Id** to the app id field +1. Copy paste the webhook url provided in the channel configuration UI to the **Messaging endpoint** field +1. Click **Register** +1. On the next page (**Connect to channels**), under the section, **Add a featured channel**, click **Configure Microsoft Teams Channel**, then click **Save** diff --git a/docs/messaging-channels/direct-integrations/slack.md b/docs/messaging-channels/direct-integrations/slack.md index 6e56526..78371a6 100644 --- a/docs/messaging-channels/direct-integrations/slack.md +++ b/docs/messaging-channels/direct-integrations/slack.md @@ -3,19 +3,67 @@ id: slack title: Slack --- ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; +![Messaging channels](/img/docs/slack-banner.png) +## Requirements + +### Create a Slack App + +You will need a Slack App to connect your bot to Slack + +1. Go to your [apps page](https://api.slack.com/apps) +1. Click **Create new app**, select **From scratch** then give it a name. Remember your App's name, you'll need it in a few minutes + +## Channel Configuration + +### Signing Secret + +The signing secret is used to verify webhook requests + +1. In the left sidebar, click on **Settings** > **Basic Information** +2. Scroll down to **App Credentials** section. Copy paste the value of the signing secret to the **Signing Secret** channel configuration + +### Bot Token + +The bot token is used to authenticate requests made to the Slack API + +1. In the left sidebar, click on **Features** > **OAuth & Permissions** +1. Add `chat:write` under the **Scope** > **Bot Token Scopes** section +1. Click on **Install to Workspace** in the **OAuth Tokens for Your Workspace** section +1. Copy paste the value in **Bot User OAuth Token** to the **Bot Token** channel configuration + +### Save Configuration + +Channel configuration is complete, you can now click **Save**. It is important you save your configuration before configuring the webhooks, otherwise Slack will be unable to validate the webhook url + +## Webhook Configuration + +### Events Webhook + +Slack sends regular events such as messages to the event webhook + +1. In the left sidebar, click on **Features** > **Event Subscriptions** +1. Turn on events by click the On/Off button +1. Under **Subscribe to bot event**, add `message.im` and `message.channels` +1. Copy paste the webhook url provided in the channel configuration UI to the **Request URL** field +1. Click the **Save Changes** button. Make sure your slack channel configuration is saved before doing this step, otherwise webhook validation will fail +1. A yellow banner will be displayed at the top of the screen. Click the **reinstall your App** link + +### Interactivity Webhook + +Slack sends "interactive" events such as reactions to message to the interactivity webhook + +1. In the left sidebar, click on **Features** > **Interactivity & Shortcuts** +1. Turn on interactivity by click the On/Off button +1. Copy paste the webhook url provided in the channel configuration UI to the **Request URL** field +1. Click the **Save Changes** button + +## Install App + +### Add App to Workspace -import SlackLocal from './slack/local.md' -import SlackCloud from './slack/cloud.md' +Your slack app needs to be added to your workspace to allow Slack users to communicate with it - - - - - - - - +1. In the left sidebar, click on **Features** > **App Home** +1. Scroll down and tick **Allow users to send Slash commands and messages from the messages tab** +1. In Slack, under the **Apps** section of the sidebar, click the **+ Add apps** button. In the search bar, type the name of your Slack app. Click on your Slack app in the search results. You can now chat with your Slack App diff --git a/docs/messaging-channels/direct-integrations/slack/cloud.md b/docs/messaging-channels/direct-integrations/slack/cloud.md deleted file mode 100644 index c11c915..0000000 --- a/docs/messaging-channels/direct-integrations/slack/cloud.md +++ /dev/null @@ -1,62 +0,0 @@ -## Requirements - -### Create a Slack App - -You will need a Slack App to connect your bot to Slack - -1. Go to your [apps page](https://api.slack.com/apps) -1. Click **Create new app**, select **From scratch** then give it a name. Remember your App's name, you'll need it in a few minutes - -## Channel Configuration - -## Signing Secret - -The signing secret is used to verify webhook requests - -1. In the left sidebar, click on **Settings** > **Basic Information** -2. Scroll down to **App Credentials** section. Copy paste the value of the signing secret to the **Signing Secret** channel configuration - -## Bot Token - -The bot token is used to authenticate requests made to the Slack API - -1. In the left sidebar, click on **Features** > **OAuth & Permissions** -1. Add `chat:write` under the **Scope** > **Bot Token Scopes** section -1. Click on **Install to Workspace** in the **OAuth Tokens for Your Workspace** section -1. Copy paste the value in **Bot User OAuth Token** to the **Bot Token** channel configuration - -### Save Configuration - -Channel configuration is complete, you can now click **Save**. It is important you save your configuration before configuring the webhooks, otherwise Slack will be unable to validate the webhook url - -## Webhook Configuration - -### Events Webhook - -Slack sends regular events such as messages to the event webhook - -1. In the left sidebar, click on **Features** > **Event Subscriptions** -1. Turn on events by click the On/Off button -1. Under **Subscribe to bot event**, add `message.im` and `message.channels` -1. Copy paste the webhook url provided in the channel configuration UI to the **Request URL** field -1. Click the **Save Changes** button. Make sure your slack channel configuration is saved before doing this step, otherwise webhook validation will fail -1. A yellow banner will be displayed at the top of the screen. Click the **reinstall your App** link - -### Interactivity Webhook - -Slack sends "interactive" events such as reactions to message to the interactivity webhook - -1. In the left sidebar, click on **Features** > **Interactivity & Shortcuts** -1. Turn on interactivity by click the On/Off button -1. Copy paste the webhook url provided in the channel configuration UI to the **Request URL** field -1. Click the **Save Changes** button - -## Install App - -### Add App to Workspace - -Your slack app needs to be added to your workspace to allow Slack users to communicate with it - -1. In the left sidebar, click on **Features** > **App Home** -1. Scroll down and tick **Allow users to send Slash commands and messages from the messages tab** -1. In Slack, under the **Apps** section of the sidebar, click the **+ Add apps** button. In the search bar, type the name of your Slack app. Click on your Slack app in the search results. You can now chat with your Slack App diff --git a/docs/messaging-channels/direct-integrations/slack/local.md b/docs/messaging-channels/direct-integrations/slack/local.md deleted file mode 100644 index 4755a1a..0000000 --- a/docs/messaging-channels/direct-integrations/slack/local.md +++ /dev/null @@ -1,90 +0,0 @@ -## Requirements - -### HTTPS Endpoint - -To connect to Slack, an HTTPS endpoint is required. Set the `externalUrl` field in `botpress.config.json`. You can use the following methods to create this endpoint: - -- Create an HTTPS tunnel to your machine using Ngrok. This tutorial works on pretty much any Operating System ([tutorial](https://api.slack.com/tutorials/tunneling-with-ngrok)). -- Using Nginx and Let's Encrypt. This tutorial is based on the Linux Ubuntu 16.04 Operating System ([tutorial](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04)). -- Use Serveo to create an HTTPS tunnel to your machine ([tutorial](https://medium.com/automationmaster/how-to-forward-my-local-port-to-public-using-serveo-4979f352a3bf)). - -:::note -To test on localhost, you can also use services like [pagekite](https://pagekite.net/) or [tunnelme](https://localtunnel.github.io/www/) to expose your server. -::: - -## Setup - -### Create Your Bot - -First, you need a bot in Botpress. Take note of your bot's ID. - -### Connecting Your Bot to Slack - -1. Go to your [apps page](https://api.slack.com/apps). - -2. Click **Create new app**, select **From scratch** then give it a name. Remember your App's name, you'll need it in a few minutes. - -3. Open the page **Features**, then select **Interactivity & Shortcuts** and turn the **Interactivity** switch to _On_. - -4. Set the request URL to: `/api/v1/messaging/webhooks//slack/interactive`. - -- Replace `EXTERNAL_URL` by the value of `externalUrl` in your `botpress.config.json`; -- Replace `YOUR_BOT_ID` with your bot ID. - -5. Save your changes. - -6. Open the page **Features**. Then, click **OAuth & Permissions** and add `chat:write` under the **Scope** > **Bot Token Scopes** section. - - -7. Open the page **Features**, then click **App Home** and under the **Show Tabs** section, check **Allow users to send Slash commands and messages from the messages tab**. - -8. From the **Settings**, go to the **Basic Information**. Then, go to the **Install app** section, install the app by clicking the **Install to Workspace** button. On the next screen, click the **Allow** button. - -9. In Botpress, edit `data/bots//bot.config.json`. In the `messaging.channels.slack` section write this configuration: - -- `enabled`: set to `true`; -- `signingSecret`: take the value `Signing Secret` on the section `Basic Information` > `App Credentials`; -- `useRTM`: `false` (`true` if you have a legacy app); -- `botToken`: take the value `Bot User OAuth Token` on the section **OAuth & Permissions** > **OAuth Tokens for Your Workspace**. - - Your `bot.config.json` should look like this : - -```json -{ - // ... other data - "messaging": { - "channels": { - "slack": { - "enabled": true, - "signingSecret": "your_signing_secret", - "useRTM": false, - "botToken": "your_bot_token" - } - // ... other channels can also be configured here - } - } -} -``` - -10. Restart Botpress. - -11. Back on the your Slack app's page, open the page **Features**. Then, click **Event Subscriptions** and turn the **Enable Events** switch to **On**. - -12. Set the `Request URL` to: `/api/v1/messaging/webhooks//slack/events`. - -- Replace `EXTERNAL_URL` by the value of `externalUrl` in your `botpress.config.json`; -- Replace `YOUR_BOT_ID` with your bot ID. - -:::caution -If the slack endpoint is responding with `Cannot resolve challenge`. The configuration at step 9 is not set in the right place. The configuration need to be inside the **chatbot configuration**. -::: - -13. Under **Subscribe to bot event**, add `message.im` and `message.channels` (you can also add other types of messages if you want). - -14. Wait for the green `Verified` message to appear next to `Request URL`. Save your changes. - -15. A yellow banner will be displayed at the top of the screen. Click the **reinstall your app** link. On the next screen, click the **Allow** button. - -16. Quit the Slack app and re-open it. - -17. In Slack, under the **Apps** section of the sidebar, click the **+ Add apps** button. In the search bar, type the name of your Slack App. Click on your Slack app in the search results. You can now chat with your Botpress bot in Slack. diff --git a/docs/messaging-channels/direct-integrations/teams/cloud.md b/docs/messaging-channels/direct-integrations/teams/cloud.md deleted file mode 100644 index 93b9182..0000000 --- a/docs/messaging-channels/direct-integrations/teams/cloud.md +++ /dev/null @@ -1,32 +0,0 @@ -## Requirements {#cloud} - -### Configure Microsoft Account - -Your Microsoft Account should have access to Azure and Teams. You can check out the [Azure](https://docs.microsoft.com/en-us/azure/devops/?view=azure-devops) and [Teams](https://docs.microsoft.com/en-us/microsoftteams/) documentation for information on how to make these connections - -## Channel Configuration - -## Register App - -1. In the Azure portal, open the [App registrations](https://portal.azure.com#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) page -1. Click **New registration**, then choose a name for your application -1. In the section **Supported account types**, choose **Accounts in any organizational directory and personal Microsoft accounts**, then click **Register** -1. Copy paste the value of `Application (client) ID` to the **App Id** channel configuration - -## App Password - -1. Click **Certificates & secrets**, then click **New client secret**, then fill in the required fields -1. Copy paste the the value in the **Value** column to the **App Secret** channel configuration - -### Save Configuration - -Channel configuration is complete, you can now click **Save** - -## Create Your Bot - -1. Navigate to the [Bot Framework Registration Page](https://dev.botframework.com/bots/new) -1. Fill the **Display name** and **Bot handle** fields with whatever value -1. Copy paste you **App Id** to the app id field -1. Copy paste the webhook url provided in the channel configuration UI to the **Messaging endpoint** field -1. Click **Register** -1. On the next page (**Connect to channels**), under the section, **Add a featured channel**, click **Configure Microsoft Teams Channel**, then click **Save** diff --git a/docs/messaging-channels/direct-integrations/teams/local.md b/docs/messaging-channels/direct-integrations/teams/local.md deleted file mode 100644 index 5279e36..0000000 --- a/docs/messaging-channels/direct-integrations/teams/local.md +++ /dev/null @@ -1,109 +0,0 @@ -## Requirements {#local} - -### Configure Microsoft Account - -Your Microsoft Account should have access to Azure and Teams. You can check out the [Azure](https://docs.microsoft.com/en-us/azure/devops/?view=azure-devops) and [Teams](https://docs.microsoft.com/en-us/microsoftteams/) documentation for information on how to make these connections. - -### Configure HTTPS Endpoint - -To connect to Microsoft Teams, an HTTPS endpoint is required. This is set in the `externalUrl` field in `botpress.config.json`. You can use the following methods to create this endpoint: - -- Create an HTTPS tunnel to your machine using Ngrok. This tutorial works on pretty much any Operating System ([Tutorial](https://api.slack.com/tutorials/tunneling-with-ngrok)). -- Using Nginx and Let's Encrypt. This tutorial is based on the Linux Ubuntu 16.04 Operating System ([Tutorial](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04)). -- Use Serveo to create an HTTPS tunnel to your machine ([**Tutorial**](https://medium.com/automationmaster/how-to-forward-my-local-port-to-public-using-serveo-4979f352a3bf)). - -:::note - -To test on localhost, you can also use services like [pagekite](https://pagekite.net/) or [tunnelme](https://localtunnel.github.io/www/) to expose your server. - -::: - -### Before Getting Started... - -Since the framework V4 is still in active development, some of these instructions may be slightly different. If you ever get stuck, check the [Official Bot Framework documentation](https://docs.microsoft.com/en-us/microsoftteams/platform/concepts/bots/bots-create). - -### Create Application & Generate Password - -1. Log on to your account on [Microsoft Azure](https://azure.microsoft.com). - -2. In the Azure portal, open the [App registrations](https://portal.azure.com#blade/Microsoft_AAD_RegisteredApps/ApplicationsListBlade) page. - -3. Click **New registration**, then choose a name for your application. - -4. In the section **Supported account types**, choose **Accounts in any organizational directory and personal Microsoft accounts**, then click **Register**. - -5. Write down the value of `Application (client) ID`. We'll need it later for the channel configuration. - -6. Click **Certificates & secrets**, then click **New client secret**, then fill in the required fields. - -7. Write down the value of the generated secret. - :::note - You can't access it later. - ::: - -### Create Your Bot - -1. Navigate to the [Bot Framework Registration Page](https://dev.botframework.com/bots/new) and fill in the required information: - -- Display name -- Bot handle -- The Microsoft App ID (that we generated in step 1) -- Messaging endpoint (keep it blank for now - more on that later) - -You can also fill the other fields as you wish, but they will not impact Botpress. - -2. Click **Register**. - -3. On the next page (**Connect to channels**), under the section, **Add a featured channel**, click **Configure Microsoft Teams Channel**, then click **Save**. No other configuration is needed at this point. - -## Configuration - -### Configure Channel on Botpress - -1. Open MS Teams (either the web version or the desktop client), then start a new conversation. In the search bar, paste your Microsoft App Id. You should see your registered bot. - -2. Try talking to your bot. If you get a message saying that an administrator has disabled your bot, you must enable App sideloading in your Microsoft admin portal. See this [article](https://docs.microsoft.com/en-us/microsoftteams/enable-features-office-365) for more details. - -You can now continue to next [section](#setting-up-ms-teams-channel-from-an-already-configured-ms-bot-with-an-appid-and-password). - -3. Edit `data/bots//bot.config.json`. In the `messaging.channels.teams` section write this configuration : - -- `enabled`: set to `true` -- `appId`: the appId you created in when creating your teams bot -- `appPassword`: the app password you created when creating your teams bot - - Your `bot.config.json` should look like this : - -```json -{ - // ... other data - "messaging": { - "channels": { - "teams": { - "enabled": true, - "appId": "your_app_id", - "appPassword": "your_app_password", - // (Optional) - "proactiveMessages": { - "en": "proactive message", - "fr": "message proactif", - ... - } - } - // ... other channels can also be configured here - } - } -} -``` - -### Final Configuration - -1. Start Botpress, then you should see your Messaging Endpoint in the startup logs. - -2. Open the [Bot Framework](https://dev.botframework.com/bots) page, then click the name of your bot. - -3. Click the **Settings tab**, then scroll down to **Messaging endpoint**. - -4. Set the value of the endpoint that was displayed in the logs. If it is missing, it should looks like that: - -`/api/v1/messaging/webhooks/ - - - - - - - + +![Messaging channels](/img/docs/telegram-banner.png) + +## Requirements + +### Create a Bot + +To create a bot on Telegram, use Telegram's BotFather. BotFather is a bot on Telegram that manages all the bots that you create via your account on Telegram. It will ask you for a name and username, then generate an authorization token for your new bot. + +The name of your bot is displayed in contact details and elsewhere. + +The Username is a short name to be used in mentions and t.me links. Usernames are 5-32 characters long and are case insensitive but may only include Latin characters, numbers, and underscores. Your bot's username must end in `bot`, such as `tetris_bot` or `TetrisBot` + +## Channel Configuration + +### Generate an Authorization Token + +When you create a Telegram bot, Botfather will automatically generate a token. The token is a string that is required to authorize the bot and send requests to the Bot API. Keep your token secure and store it safely; anyone can use it to control your bot. + +If your existing token is compromised or you lost it for some reason, use the `/token` command to generate a new one. + +### Bot Token + +Copy paste your telegram bot token into the **Bot Token** channel configuration and click **Save**. Webhooks will be created automatically. diff --git a/docs/messaging-channels/direct-integrations/telegram/cloud.md b/docs/messaging-channels/direct-integrations/telegram/cloud.md deleted file mode 100644 index 4b4b6b0..0000000 --- a/docs/messaging-channels/direct-integrations/telegram/cloud.md +++ /dev/null @@ -1,23 +0,0 @@ -## Requirements - -### Create a Bot - -To create a bot on Telegram, use Telegram's BotFather. The BotFather will ask you for a name and username, then generate an authorization token for your new bot - -The name of your bot is displayed in contact details and elsewhere - -The Username is a short name to be used in mentions and t.me links. Usernames are 5-32 characters long and are case insensitive but may only include Latin characters, numbers, and underscores. Your bot's username must end in `bot`, such as `tetris_bot` or `TetrisBot` - -## Channel Configuration - -### Generate an Authorization Token - -When you create a Telegram bot, Botfather will automatically generate a token. The token is a string that is required to authorize the bot and send requests to the Bot API. Keep your token secure and store it safely; anyone can use it to control your bot - -If your existing token is compromised or you lost it for some reason, use the `/token` command to generate a new one - -### Bot Token - -Copy paste your telegram bot token into the **Bot Token** channel configuration and click **Save**. Webhooks will be created automatically - -1. Copy paste your telegram bot token into the Bot Token channel configuration and click Save. Webhooks will be created automatically diff --git a/docs/messaging-channels/direct-integrations/telegram/local.md b/docs/messaging-channels/direct-integrations/telegram/local.md deleted file mode 100644 index 76b30b2..0000000 --- a/docs/messaging-channels/direct-integrations/telegram/local.md +++ /dev/null @@ -1,47 +0,0 @@ -## Requirements - -- An HTTPS Endpoint to your chatbot: - - - Set the `externalUrl` field in `botpress.config.json` - - Create an HTTPS tunnel to your machine using Ngrok ([Tutorial](https://api.slack.com/tutorials/tunneling-with-ngrok)). - - Using Nginx and Let's Encrypt ([Tutorial](https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04)). - -### Create a Bot - -To create a bot on Telegram, use Telegram's [BotFather](https://t.me/botfather). The BotFather will ask you for a name and username, then generate an authorization token for your new bot. - -The name of your bot is displayed in contact details and elsewhere. - -The Username is a short name to be used in mentions and t.me links. Usernames are 5-32 characters long and are case insensitive but may only include Latin characters, numbers, and underscores. Your bot's username must end in `bot`, such as `tetris_bot` or `TetrisBot`. - -## Setup {#cloud} - -### Generate an Authorization Token - -When you create a Telegram bot, Botfather will automatically generate a token. The token is a string that is required to authorize the bot and send requests to the Bot API. Keep your token secure and store it safely; anyone can use it to control your bot. - -If your existing token is compromised or you lost it for some reason, use the `/token` command to generate a new one. - -1. Edit `data/bots//bot.config.json`. In the `messaging.channels.telegram` section write this configuration : - -- `enabled`: set to `true` -- `botToken`: your bot token - - Your `bot.config.json` should look like this: - -```json -{ - // ... other data - "messaging": { - "channels": { - "telegram": { - "enabled": true, - "botToken": "your_bot_token" - } - // ... other channels can also be configured here - } - } -} -``` - -1. Restart Botpress and talk to your Telegram bot. The webhook will be configured automatically to point to `/api/v1/messaging/webhooks/ -``` - -Replace `` by your actual Botpress Server url. \ No newline at end of file +| | Messenger | Microsoft Teams | Slack | Telegram | Twilio | Vonage | Smooch | +| ------------- | :-------: | :-------------: | :---: | :------: | :----: | :----: | :----: | +| Text | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Quick Reply | ✔ | ✔ | ✔ | N/A | ✔ | ✔ | N/A | +| Postback | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Say Something | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | +| Voice | - | - | - | - | - | - | - | +| Image | - | - | - | - | - | - | - | +| File | - | - | - | - | - | - | - | +| Audio | - | - | - | - | - | - | - | +| Video | - | - | - | - | - | - | - | +| Location | - | - | - | - | - | - | - | \ No newline at end of file diff --git a/docs/messaging-channels/supported-content-types.md b/docs/messaging-channels/supported-content-types.md deleted file mode 100644 index 1807acd..0000000 --- a/docs/messaging-channels/supported-content-types.md +++ /dev/null @@ -1,41 +0,0 @@ ---- -id: supported-content-types -title: Supported Content Types ---- - --------------------- - -## Sending - -This is the list of content types we support sending to each channel. - -| | Messenger | Microsoft Teams | Slack | Telegram | Twilio | Vonage | Smooch | -| ---------- | :---------------------: | :----------------------: | :---------------------: | :------: | :-------------------------: | :----------------------: | :----: | -| Text | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Image | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Choice | ✔ | ✔ | ✔ | ✔ | ✔ (choices down rendered) | ✔ | ✔ | -| Dropdown | ✔ | ✔ | ✔ | ✔ | ✔ (choices down rendered) | ✔ | ✔ | -| Card | ✔ | ✔ | ✔ | ✔ | ✔ (buttons down rendered) | ✔ (buttons down rendered)| ✔ | -| Carousel | ✔ | ✔ | ✔ | ✔ | ✔ (buttons down rendered) | ✔ (buttons down rendered)| ✔ | -| File | ✔ as URL) | ✔ (as URL) | ✔ (as URL) | ✔ | ✔ (as URL) | ✔ | ✔ | -| Audio | ✔ (as URL) | ✔ (as URL) | ✔ (as URL) | ✔ | ✔ | ✔ | ✔ | -| Video | ✔ (as URL) | ✔ (as URL) | ✔ (as URL) | ✔ | ✔ (as URL) | ✔ | ✔ | -| Location | ✔ (as Google Maps links)| ✔ (as Google Maps links)| ✔ (as Google Maps links)| ✔ | ✔ (as Google Maps links) | ✔ | ✔ | - - -## Receiving - -This is the list of content-types we support receiving from each channel. - -| | Messenger | Microsoft Teams | Slack | Telegram | Twilio | Vonage | Smooch | -| ------------- | :-------: | :-------------: | :---: | :------: | :----: | :----: | :----: | -| Text | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Quick Reply | ✔ | ✔ | ✔ | N/A | ✔ | ✔ | N/A | -| Postback | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Say Something | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | -| Voice | - | - | - | - | - | - | - | -| Image | - | - | - | - | - | - | - | -| File | - | - | - | - | - | - | - | -| Audio | - | - | - | - | - | - | - | -| Video | - | - | - | - | - | - | - | -| Location | - | - | - | - | - | - | - | \ No newline at end of file diff --git a/docs/misunderstood/misunderstood.md b/docs/misunderstood/misunderstood.md new file mode 100644 index 0000000..fb05112 --- /dev/null +++ b/docs/misunderstood/misunderstood.md @@ -0,0 +1,10 @@ +Misunderstood +What it is? +How does it work? + +Pending +Resolved +Ignored + +Amend +Ignore diff --git a/docs/overview/cloud/getting-started.mdx b/docs/overview/cloud/getting-started.mdx deleted file mode 100644 index 618bea9..0000000 --- a/docs/overview/cloud/getting-started.mdx +++ /dev/null @@ -1,126 +0,0 @@ ---- -id: getting-started -title: Getting Started (beta) ---- - ---- - -import ReactPlayer from "react-player" - -:::info - -Due to the large interest in the Cloud beta, we've added a few constraints to ensure a smooth experience for all users: - -- 3 chatbots max per developer account -- Cloud-native chatbots only, i.e., bots created on Botpress v12.27.0-beta and later. Existing chatbots should not be ported to the Cloud Beta due to differences in the Cloud SDK. -- English language only chatbots -- Small-to-moderate-sized chatbots only. Chatbots with an excess number of intents, flows, actions, etc., will get an error message on the beta." - -::: - -# Introduction - -Botpress Cloud is the only open-source chatbot deployment solution on the cloud and provides an easy one-click deployment feature. Our new platform will rapidly reduce the time and money spent on typical chatbot deployments. Plus, it’s entirely open-source, giving developers complete flexibility and zero vendor lock-in. - -:::info -For more info about the pitch you can go [here](https://botpress.com/cloud-beta) -::: - -## Instruction - -:::note -Prefer a video ? - -This video include all the step from this tutorial. - - - -::: - -### Create an account on the botpress cloud - -1. Go on the botpress [cloud](https://app.botpress.cloud) - -1. Create an account > Click **Sign Up** - -![Sign Up](/assets/cloud/login.png) - -1. Confirm your account in your email. - -1. **Sign In** with your account - -:::info -Botpress Cloud Beta supports Telegram, Messenger, Slack, SunCo, Teams, Twilio, Vonage, and web chat. -::: - -### Create a chatbot on the cloud platform {#cloud-platform} - -:::caution -In the following step, you will create a chatbot in the cloud and in the binary. We are doing this to link the application. -::: - -1. Click on **Select Chatbot** > **Create Chatbot** -1. Enter the chatbot name - ![chatbot name](/assets/cloud/first-chatbot.jpg) -1. Copy the **key** and the **secret** for the next step - ![Key from the studio](/assets/cloud/cloud-key.png) - -:::danger -Make sure to safely store the key and secret. -::: - -### Download and install Botpress 12.27.0 Beta​ - -1. Go to Botpress 12.27.0 [Beta Download](botpress.com/download) -1. Click the download button for your operating system - 1. On Linux: unzip the file, enter the folder and double click the bp file to start the script. - 1. On Linux: unzip the file, enter the folder and double click the bp file to start the script. - -### Create a Chatbot in the Downloaded Botpress app - -1. Open Botpress - 1. On Linux: open the unzipped folder and double click the bp file. Once the application is ready, you should get a message asking you to go to localhost:3000. - 1. On Mac and Windows: use your operating system to search for and open Botpress Beta. -1. In the Botpress Administration Panel, click ‘Create Bot’ then ‘New Bot’ to open the bot creation panel. -1. Give your bot a name and ID and then select ‘Enable Botpress Cloud’. -1. Select ‘Learn Botpress’ as the template. Optionally, you can try selecting the ‘Empty Bot’ (see extra information below). -1. Enter your key and secret from the Botpress Cloud step. - ![Key from the studio](/assets/cloud/studio-key.png) -1. Click on the chatbot name you have created to open up the Botpress Studio. -1. Train your chatbot - ![Train chatbot](/assets/cloud/train-chatbot.png) -1. Click on `Deploy to cloud` at the top Right - ![Deploy to cloud](/assets/cloud/deploy.png) - -:::caution -Your chatbot must be trained in order to be deployed correctly. -::: - -### In the cloud platform, set up a Telegram channel - -1. Open the botfather on [telegram](https://t.me/botfather) -1. Start the conversation -1. Type `/newbot` and follow the instruction. - ![telegram /newbot](/assets/cloud/telegram.png) -1. Get the HTTP API token from the botfather. - :::info - You can click on the red text to copy the text into your clipboard - ::: - ![API Key Telegram](/assets/cloud/api-key-telegram.png) -1. Copy the keys, in the bot token - :::caution - The webhook part should be auto-populated. If it's not populated try Hard-refresh (SHIRT+(CTRL|COMMAND)+R) or restart from the [Create chatbot cloud](#cloud-platform) - ::: - ![API Key Telegram in the studio](/assets/cloud/api-key-telegram-studio.png) -1. Click `enabled` button -1. Click on `Save` - -:::caution -When copying and pasting credentials, remember to remove trailing whitespaces (trailing whitespaces will cause the channel connection to fail). -::: - -## Conclusion - -In this lesson, we cover the basic on botpress (Creating a node, Deploying a chatbot, Use a chatbot on a channel). We are really happy to release the botpress cloud version. - -If you are interested to learn more about botpress. You can ask question on the github discussion [forum](https://github.com/botpress/botpress/discussions) diff --git a/docs/overview/features.md b/docs/overview/features.md deleted file mode 100644 index a5ea9c8..0000000 --- a/docs/overview/features.md +++ /dev/null @@ -1,60 +0,0 @@ ---- -id: features -title: Features ---- - ---- - -## Overall Product Specifications - -| Feature | Description | Botpress Open Source | Botpress Enterprise | -| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------: | :-----------------: | -| Downloads | Available via source code, binary, or Docker image | ✔ | ✔ | -| Deployment | | ✔ | ✔ | -| Operating Systems |
  • Self hosted on-prem: Linux (for Ubuntu, Redhat, and Centos), Mac, Windows
  • Self hosted platform-as-a-service & virtual private clouds - cloud agnostic: AWS, Digital Ocean (one click), Heroku (one click), Google Cloud Platform, Microsoft Azure
| ✔ | ✔ | -| SDK | The utility functions that can be used as arguments in user custom code (hooks, actions, module entry point functions, etc.) | ✔ | ✔ | -| Database |
  • SQLite (default for development)
  • PostgreSQL (alternative for production)
| ✔ | ✔ | -| Security |
  • Standard login (configurable)
    • Password complexity & expiration policies
    • Specified login duration
    • Maximum login attempts & automatic locking of accounts
    • Session lengths & expiry
  • Audit trails: track via logs which files users are accessing and editing and when
  • Encryption
    • at rest (via PostgreSQL) - stored data and records encrypted with industry standard AES-256.
    • in flight - transmitted information are encrypted with TLS
  • Rate limits & various HTTP-server limits
  • Chatbot rollout strategies
| ✔ | ✔ | -| Accessibility | | ✔ | ✔ | -| CI/CD | | ✔ | ✔ | -| Multi-Channel Support | Instantly deliver your bots on all the major messaging channels | ✔ | ✔ | -| Botpress Webchat |
  • Create custom message widgets
    • Create your own GUI messages using React
    • Customizable with CSS
  • Flexibility for users
    • Multiple simultaneous conversations with the same bot
    • Reset & delete conversation (for privacy purposes)
    • File-sharing by users
      • hosted on AWS S3 or BPFS
      • File size/type configurable
| ✔ | ✔ | -| 3rd party NLU support | Easily migrate NLU projects done using other chatbots
  • Google DialogFlow to Botpress
  • Rasa to Botpress
  • Custom via Hooks
| ✔ | ✔ | -| Custom Chatbot Branding | Rebrand the Botpress webchat interface, with _Powered by Botpress_ identification | ✔ | ✔ | -| Community Support | Botpress forum & community | ✔ | ✔ | -| Licensing | | ✔ | ✔ | - -## Features within the Botpress Solution - -| Feature | Description | Botpress Open Source | Botpress Enterprise | -| --------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------: | :-----------------: | -| Multi-Lingual Support |
  • Botpress developer interface: English, French, Spanish
  • Available chatbot languages
    • One click for Arabic, Dutch, English, French, German, Hebrew, Italian, Japanese, Polish, Portuguese, Russian, Spanish
    • 157 other languages available via FastText
| ✔ | ✔ | -| Conversational AI Management | Managed Natural Language Understanding (NLU) Engine – an industrial-grade native NLU engine, from domain specific natural language to structured data
  • Intent classification - understand the type of action (or ‘out of scope’) conveyed in the sentences and all its participating parts (e.g. book a flight, order dinner, buy a product, etc.)
  • Entity extraction - locate and classify named entities into predefined categories such as person names, organizations, locations, product SKUs, etc.
    • Regex/pattern entities
    • List entities
    • Fuzzy matching
    • All types of pre-built entities (via Facebook Duckling)
    • "Any" type (for entities that do not have a finite number of combination)
  • Slot tagging - tag the words which carry meaning to the sentences (e.g. landing city, type of meal, etc.)
  • Language identification - determining the natural language that a document or part thereof is written in (e.g. English, French, etc.)
  • Spell checking - check for misspellings and automatically fix the spelling mistakes so that the downstream NLU performs more accurately
  • Training resource configuration and allocation (e.g. training queue size, cache size, etc)
| ✔ | ✔ | -| Content Management System | Explicit separation of chatbot content from conversation flow, making that content easy to update
  • Translation center - see all your content in one place & see missing translations for a specific language
  • Audio
  • Button
  • Card
  • Carousel/Gallery
  • Dropdown
  • File / Attachment
  • Free text
  • Image
  • Location
  • Quick replies/Single choice
  • Video
| ✔ | ✔ | -| Visual conversation / dialog management | Visual developer interface to create and management dialog states and context
  • Low code drag and drop user interface
  • Multiple visual flows and subflows with conditions
  • Multi-turn and the ability to jump from a topic to another seamlessly
  • Context management - process that enables data elements pertaining to a specific subject to be maintained within conversations (e.g. user name, SKU number, etc.)
  • Broadcast module - send scheduled chatbot wide messages
  • Conversational detours - while the visual flows represent the "happy paths" that are desired by the conversation designers, detours are about automatically and gracefully handling exceptions
  • Version control - changes to the visual tools such as the flow builder or content manager are version controlled and trackable
  • Template management - create, manage and reuse flows and subflows
  • Intelligent slot filling - prompting for missing form fields
  • Skills management - group and reuse flows and subflows to embed and manage domain specific knowledge
  • Code autocompletion and user interface shortcuts
| ✔ | ✔ | -| FAQ/Q&A | Create, manage, and centrally access the most frequently asked questions the users may have
  • Context management
  • Rich messages
  • Workflow triggering
  • Bulk import/export
  • Translation interface
  • Message "alternatives" - the bot doesn’t always say the same thing
| ✔ | ✔ | -| Human in the Loop (HITL) | Delegate a conversation to an agent when needed, while collecting analytics to improve future chatbot performance
  • Dedicated user interface
  • User variables
  • Conversation queue, preview, history, and labeling
  • Comments on conversations
  • Shortcuts
| ✔ | ✔ | -| Analytics & continuous chatbot training | Dashboards and tools to capture and improve user engagement and chatbot accuracy
  • Misunderstood - capture everything the chatbot doesn't understand and use it to improve your chatbot or expand its capabilities
  • Engagement
  • Conversations
  • Interactions
| ✔ | ✔ | -| Testing, debugging, and logging | | ✔ | ✔ | -| Chatbot privacy | | ✔ | ✔ | -| JavaScript IDE | Easily integrate with your internal systems and any third parties
  • Actions & Hooks - create and edit actions within Botpress (e.g. query a database, call an API, etc.). Features typing and intelligent code completion
  • Libraries - import NPM modules without having to create a custom module
  • VS Code embedded in Botpress Studio
  • Option for others that are Javascript compliant
| ✔ | ✔ | - -## Enterprise-Specific Features - -| Feature | Description | Botpress Open Source | Botpress Enterprise | -| ---------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :------------------: | :-----------------: | -| Licensing | Botpress Proprietary License | — | ✔ | -| Deployment | Botpress cloud (shared multi-tenant environment) – Q1 2022 | — | ✔ | -| Database for multi-node environments | Redis | — | ✔ | -| Enhanced Enterprise Security for Chatbot users | | — | ✔ | -| Role-based access control (RBAC) | RBAC - Users can be assigned roles, and permissions can be managed with regards to these roles in terms of giving users read and/or write access to specific features | — | ✔ | -| Single-Sign On (SSO) | | — | ✔ | -| Authentication | | — | ✔ | -| Scalability |
  • Horizontal scaling - deploy as many Botpress instances as required
  • Address increasing demands on the solution as your user base grows
| — | ✔ | -| Monitoring | | — | ✔ | -| In-chatbot language flexibility | Natural Language Understanding: any number of languages within the same chatbot; the bot is able to detect the user's language and then answer in kind | — | ✔ | -| Enterprise complete branding | | — | ✔ | -| Enterprise Support |
  • Advanced Botpress technical support
  • Standard: EST business hours
  • Premium: 24/7
  • SLA
| — | ✔ | -| Enterprise Automation |
  • Salesforce
  • Zendesk
| — | ✔ | -| HITL Next | Multi-agent solution for small call center teams
  • Multi-agent
  • Real-time collaboration
  • Handoff to Zendesk
  • Handoff to Salesforce
| — | ✔ | -| Collaboration | Real-time collaboration, with workspaces to organize both chatbots and developer work
  • Realtime collaborative interface ( with lock management)
  • Workspaces - logical unit that groups up your conversational assistants based on the purpose of the chatbots or for something more granular such as for a specific task, etc.
| — | ✔ | diff --git a/docs/overview/quickstart/admin-dashboard.md b/docs/overview/quickstart/admin-dashboard.md deleted file mode 100644 index f8ddc36..0000000 --- a/docs/overview/quickstart/admin-dashboard.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -id: admin-dashboard -title: Admin Dashboard ---- - --------------------- - -The Admin Dashboard is where you manage and configure everything related to your Botpress Server installation. It is the one-stop-shop for all functionalities that affect all the chatbots on a Botpress Server instance. - -### Features - -The following features and configurations are done in the Admin Dashboard. - -- Creating new chatbots -- Managing your Botpress Enterprise license and sync with version control -- Updating your profile and your Botpress Account -- Unpacking and activating modules - -:::note -Please bear in mind that this account only exists on your local Botpress installation. There is no central authentication service linked to our servers. -::: - -To open the Admin Dashboard, visit [`http://localhost:3000`](http://localhost:3000) in your favorite web browser. After that, register the main admin account to start using Botpress. \ No newline at end of file diff --git a/docs/overview/quickstart/building-a-bot.md b/docs/overview/quickstart/building-a-bot.md deleted file mode 100644 index 6054d16..0000000 --- a/docs/overview/quickstart/building-a-bot.md +++ /dev/null @@ -1,81 +0,0 @@ ---- -id: building-a-bot -title: Building a Chatbot with Botpress ---- - --------------------- - -### Create a New Chatbot - -In Botpress, each different chatbot belongs to a workspace. When you start Botpress for the first time, you'll have a default workspace created automatically for you. - -Let's create a new chatbot with the **Create bot> New Bot** button. - -![Create Bot](/assets/workspace_bot.png) - -All you have to do is pick a name for your chatbot (a unique `Bot ID` will be generated for you), then select a chatbot template. - -:::note -The **Bot ID** can't be changed in the future, so it's crucial to pick a meaningful name. Also, bear in mind that this ID will be visible to the users of your chatbot. -::: - -You may start from scratch with the "Empty Bot," or you can use one of the available templates for a quick demonstration of various features. - -![Create Bot](/assets/create-bot.png) - -Once created, click on the chatbot's name to open the Studio interface and edit your chatbot. - -### Test your Chatbot - -There is a chat emulator built in the studio with which you can test your chatbot. You can open it from the Emulatorbutton in the top right corner or press 'ctrl + E' while in the studio. - -The chat emulator represents what your visitors will face when they speak with your chatbot. You can reset the conversation by clicking the reset button or you can start a new conversation with the conversations button. - -- Reset Conversation: Brings you back at the beginning of the conversation flow, but keeps the variables previously stored. -- Create New Conversation: Brings you back at the beginning of the conversation flow and clean the variables stored. - -![Toolbar Chat](/assets/studio-toolbar.png) - -*In the order presented: Debug, Reset, Download, Conversations, Close emulator.* - -Open the chat window and say, "_Hello_." If you selected the **Welcome Bot** template, it should greet you with something like "_Hi, I'm Welcome Bot! My task is to help you understand how Botpress works._". - -![Hello from the chatbot](/assets/flow_page.png) - -You can get additional information from the emulator's debugger by selecting the debug button. This panel is specifically designed for you, as the chatbot developer, to understand why you get a specific answer. Note that it is only available for authenticated users. It includes all sorts of useful information: the dialog engine's elected suggestion, nodes flowed through, and natural language intents or questions. You can also view the raw JSON event that contains all details if you need further data. - -![Emulator Hello](/assets/debugger.png) - -### Question and Answer - -One of the modules shipped by default with Botpress is the Q&A (Question and Answer) module. This module allows you to easily and quickly add knowledge to your chatbot without creating a flow or writing code. Q&A uses the NLU engine to detect the questions and automatically answer them. - -#### Adding a Q&A - -1. Click the **Q&A** panel on the left. -2. Click the "**Add New**" button. -3. Type in the "Questions" textbox any question, for example: "How old are you?". Then add as many different ways of asking the same question as you want. -4. In the "Answers" section, type the message you want your chatbot to provide, then press Enter to commit the answer. -5. Click "**Add**." - -The Q&A module will automatically retrain the NLU model in the background and tell you when it's completed, indicated in the bottom right. You can speak again with your chatbot, and it should respond to your question correctly, even if you make some typos! - -#### Q&A Example - -![A new Q&A](/assets/newqna.png) - -## Share your Chatbot - -### Standalone Chat - -Congratulations on building your first chatbot! You can share this chatbot with your friends, provided they have access to your computer. It is available at `http://localhost:3000/s/<>`. - -### Website Embedding - -You can also embed this chatbot on a website. To learn how, check out the example provided in `assets/modules/channel-web/examples/embedded-webchat.html`, which you can see by browsing [**here**](http://localhost:3000/assets/modules/channel-web/examples/embedded-webchat.html). - -## Learn More - -Follow along as we create a simple starter bot that asks for your name and politely greets you. - -- [Hello < you>!, our equivalent of Hello World!](https://youtu.be/nYFX-P1zFEE) \ No newline at end of file diff --git a/docs/overview/quickstart/conversation-studio.md b/docs/overview/quickstart/conversation-studio.md deleted file mode 100644 index adf548f..0000000 --- a/docs/overview/quickstart/conversation-studio.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -id: conversation-studio -title: Conversation Studio ---- - --------------------- - -The studio is the main interface you'll use to build and edit your chatbot. From here, among other things, you can: - -- Train an NLU model -- Create conversation flow -- Manage content -- Test and debug your chatbot - -![Botpress Studio](/assets/studio.png) - -You will notice on the left menu there are a couple of sections available. Some of these are built inside Botpress (like _Content_ and _Flows_), while others are there because of modules installed. - -Indeed, Botpress is a highly modular platform, and the modules themselves provide the majority of the features you will use. You may use experimental ones or even develop your modules. \ No newline at end of file diff --git a/docs/overview/quickstart/installation.md b/docs/overview/quickstart/installation.md deleted file mode 100644 index 66571e1..0000000 --- a/docs/overview/quickstart/installation.md +++ /dev/null @@ -1,122 +0,0 @@ ---- -id: installation -title: Installation ---- - ---- - -Getting started with Botpress is easy. We build and distribute binaries of the latest stable version and nightly builds of the Github master branch and also have a Desktop app. - -## Quick Install - -Head over to the [**download page**](https://botpress.com/download) for the latest version, and download and install according to your OS. -If you are using linux, you must use the `sudo snap install Botpress_VERSION_NUMBER.snap --force-dangerous` command. You can then load Botpress by searching for the app on your operating system. - - -## Alternative - Download Binaries - -Binaries are useful if you want to run Botpress with special parameters, or if you want to run it from a server, or lightweight environment. - -The latest stable binaries are available for download [**here**](https://botpress.com/download). Alternatively, you may find all the versions and nightly builds in our public [**S3 Bucket**](https://s3.amazonaws.com/botpress-binaries/index.html). - - -## Alternative - Install Binaries - -To install Botpress, unzip the file you download somewhere on your computer. Make sure that your computer has at least: - -- Memory (RAM): Recommended 4 GB or above; -- Hard Drive: Recommended 64 GB of free space or above; -- A 64 bits architecture; -- The right to read/write to the Botpress directory and subdirectories. - -## Alternative - Starting Botpress Binaries - -To start Botpress, all you have to do is double-click on the `bp` file in the directory you extracted Botpress. - -Alternatively, you can also start it from the terminal using the command: - -```bash -./bp -``` - -:::note -The first time you run Botpress, the built-in modules take some time to install. The subsequent runs will be much faster. -::: - -Once the modules are installed and loaded, you should end up with something similar to the console log below: - -```bash -User@DESKTOP-T1ORLFU MINGW64 /c/BotpressBinary/botpress-v12_22_0-win-x64 -$ ./bp -06/02/2021 07:24:26.522 Launcher ======================================== - Botpress Server - Version 12.22.0 - OS win32 - ======================================== -06/02/2021 07:24:26.524 Launcher App Data Dir: "C:\Users\botpress" -06/02/2021 07:24:26.528 Launcher Using 10 modules - ⦿ analytics - ⦿ basic-skills - ⦿ builtin - ⦿ channel-web - ⦿ code-editor - ⦿ examples - ⦿ extensions - ⦿ nlu - ⦿ qna - ⦿ testing - ⊝ bot-improvement (disabled) - ⊝ broadcast (disabled) - ⊝ channel-messenger (disabled) - ⊝ channel-slack (disabled) - ⊝ channel-smooch (disabled) - ⊝ channel-teams (disabled) - ⊝ channel-telegram (disabled) - ⊝ channel-twilio (disabled) - ⊝ channel-vonage (disabled) - ⊝ google-speech (disabled) - ⊝ hitl (disabled) - ⊝ hitlnext (disabled) - ⊝ libraries (disabled) - ⊝ misunderstood (disabled) - ⊝ ndu (disabled) - ⊝ nlu-testing (disabled) - ⊝ uipath (disabled) -06/02/2021 07:24:26.529 Server Running in DEVELOPMENT MODE -06/02/2021 07:24:27.047 Server Loaded 10 modules -06/02/2021 07:24:27.299 CMS Loaded 10 content types -06/02/2021 07:24:27.303 Server Botpress Pro must be enabled to use a custom theme and customize the branding. -06/02/2021 07:24:27.859 HTTP External URL is not configured. Using default value of http://localhost:3000. Some features may not work properly -06/02/2021 07:24:27.869 Server Discovered 0 bots -06/02/2021 07:24:27.870 Server Local Action Server will only run in experimental mode -06/02/2021 07:24:27.927 Server Started in 1398ms -06/02/2021 07:24:27.928 Launcher Botpress is listening at: http://localhost:3000 -06/02/2021 07:24:27.928 Launcher Botpress is exposed at: http://localhost:3000 -06/02/2021 07:24:29.761 launcher ======================================== - Botpress Standalone NLU - Version 0.0.2 - ======================================== -06/02/2021 07:24:29.762 launcher Loading config from environment variables -06/02/2021 07:24:29.763 launcher authToken: enabled (only users with this token can query your server) -06/02/2021 07:24:29.763 launcher limit: disabled (no protection - anyone can query without limitation) -06/02/2021 07:24:29.763 launcher duckling: enabled url=http://localhost:8000 -06/02/2021 07:24:29.764 launcher lang server: url=http://localhost:3100 -06/02/2021 07:24:29.764 launcher body size: allowing HTTP resquests body of size 2mb -06/02/2021 07:24:29.764 launcher models stored at "C:\BotpressBinary\botpress-v12_22_0-win-x64" -06/02/2021 07:24:29.764 launcher batch size: allowing up to 1 predictions in one call to POST /predict -06/02/2021 07:24:29.912 launcher NLU Server is ready at http://localhost:3200/ -``` - -### Alternative - Commands - -You may also start Botpress Server using the Command Line Interface (CLI). To see all the commands available, run `./bp --help`. - -![CLI Start](/assets/cli-help.png) - -## Learn More - -Here is a video tutorial to help you set up Botpress on your computer. You can slow it down a bit to follow along. - -- [Setting up on Windows](https://youtu.be/xf246NQyMj4) -- [Setting up on Mac](https://youtu.be/SBv0QOXyHL4) -- [Setting up on Linux](https://youtu.be/89RJx0kQyKM) diff --git a/docs/overview/what-is-botpress.md b/docs/overview/what-is-botpress.md deleted file mode 100644 index 5320cb9..0000000 --- a/docs/overview/what-is-botpress.md +++ /dev/null @@ -1,204 +0,0 @@ ---- -id: what-is-botpress -title: What is Botpress? -slug: / ---- - ---- - -:::info Quick Definition -Botpress is an open-source platform for developers to build high-quality digital assistants. -::: - -At its core, Botpress is a tool to simplify building chatbots for developers. The platform puts together the boilerplate code and infrastructure you need to get a chatbot up and running and gives a complete dev-friendly platform that ships with all the tools you need to build, deploy, and manage production-grade chatbots in record time. The platform includes: - -- Built-in [Natural Language Processing](/building-chatbots/language-understanding/supported-languages) tasks such as [intent classification](/building-chatbots/language-understanding/intents/slots), spell checking, [entity extraction](/building-chatbots/language-understanding/entities/system-entities), and many others; -- A visual [Conversation Studio](/overview/quickstart/conversation-studio) to design multi-turn conversations and workflows; -- An [emulator](/building-chatbots/testing-&-debugging/emulator) & a [debugger](/building-chatbots/testing-&-debugging/debugger) to simulate conversations and debug your chatbot; -- Support for popular messaging channels like [Slack](/messaging-channels/direct-integrations/slack), [Telegram](/messaging-channels/direct-integrations/telegram), [Microsoft Teams](/messaging-channels/direct-integrations/microsoft-teams), [Facebook Messenger](/messaging-channels/direct-integrations/facebook-messenger), and an embeddable web chat; -- An SDK and Code Editor to extend the capabilities; -- [Post-deployment](/going-to-production/deploy/linux) tools like analytics, [human handoff](/chatbot-management/agent-handover/human-in-the-loop/hitlnext), and more... - -## With Botpress, You Can... - -**Automate Workflows**: Do you want to automate your chatbot? Gather the potential user information you need. And... there you go! - -**Support your customer 24/7**: You know how it works. If there's nobody when your user needs help, they will find a new place to do (almost) the same. Having a chatbot that answers your user's questions while you're asleep... What a dream! - -**Allow employees to self-serve**: Self-serve is something people _want_. Let's look at a classic example: resetting your password. Sometimes, you have to ask your system administrator or any IT person reachable (and maybe this person is sleeping too) because you have been logged out of your email. The truth is you could just ask in Slack for a password reset and do it yourself. - -**Create a conversational interface for an application**: Some applications are better delivered with a GUI, but in other cases, a conversational interface is simply a better option. It’s just natural for someone to ask in plain English rather than browsing an interface. For example, they ask: - -**Example:** -`Hey, I am looking for [insert what they want here].` - -## Chatbot Types - -A chatbot is a computer program that uses conversations as its user interface (Conversational User Interface or CUI in short). There are two types of chatbots, namely, **Rule-Based Chatbots** and **A.I. Based Chatbots**. Let's explore them in more detail. - -### Rule-Based Chatbots - -A chatbot can be **rule-based** meaning it doesn't understand much about conversations. Such a chatbot usually relies heavily on pre-populated responses (e.g., buttons) or one-word answers. User messages rarely influence responses. The chatbot moves to the next step after receiving a user message or prompts the user to give a pre-configured reply (e.g., a button or keyword). - -This type of chatbot is cheaper, easy to implement, 99% effective, and solves issues fast. It has these characteristics because the developer built the chatbot for a specific workflow. Once a user understands the chatbot's goal, s/he can easily use the chatbot for this goal. - -### AI-Based Chatbots - -These chatbots can understand language and communicate in a human-like way. They can extract useful information from conversations like dates, amounts, and locations. - -These chatbots are indispensable when you need to harvest all available data from the user's message, like dates, quantities, user's mood, and amounts. They can also help streamline conversations by gathering as much information as possible from user responses, making conversations shorter and more concise. - -While you can use Botpress to develop both kinds of chatbots, you will benefit most from the framework if you're trying to build an A.I.-based chatbot. - -## Anatomy of a chatbot - -A chatbot is quite simple: - -1. It receives messages from Messaging **channels**. -2. It **processes** these messages to understand, translate, or escalate underlying information. -3. It **decides** how to respond to the user - ![High-Level Diagram](/assets/hld.png) - The red dots are the developer extension points. These indicate where a chatbot developer can inject code to customize their chatbot. - -### Channels - -Think of a channel in the context of communication. Using this definition, we can describe a channel as any chat platform which connects your chatbot to the intended user, for example, Facebook Messenger. Botpress provides pre-built modules which allow your chatbot to send and receive messages from the following chat platforms: - -- Website Embedded Chat -- Facebook Messenger -- Twilio -- Slack -- Telegram -- Microsoft Teams -- Sunshine Conversations -- Vonage - -:::note -In Botpress, channels are installed and configured individually and locally, giving you complete control over the data transmitted between your chatbot and the chat platforms. Botpress does not proxy the messages to a 3rd party service. -::: - -Behind the scenes, Botpress implements a queuing mechanism that processes ingoing and outgoing messages sequentially. If a message fails to be processed or sent for some reason, Botpress will retry the message processing sequence before raising an error to the developer and chatbot administrator. - -### Processing - -Messages received from messaging channels are then processed. During processing, Botpress extracts data from the text sent by a chat channel user and processes it in the following ways: - -#### NLU - -**Natural Language Understanding** (or **NLU**) allows your chatbot to process messages into structured data which your chatbot can understand. The main tasks of the NLU engine are: - -- **Intent Classification**: recognizing what the user wants. -- **Entity Extraction**: extracting structured information from messages like dates, time, cities, names, and more. -- **Slot tagging**: identify necessary **parameters** to fulfill given tasks. -- **Language Identification**: knowing in which language the user is writing. -- **Spell Checking**: giving you one less thing to worry about by making sure your user's text input is spelt correctly by fixing typo and other errors. -- **Out of Scope Recognition**: identifying instances when a user says something that the chatbot cannot understand. - -All of the above will help you create more natural and pleasurable conversations. - -#### HITL - -**Human In The Loop** allows a real person to replace the chatbot. This may be in response to the user's request for assistance by a person or may be triggered by a pre-programmed condition which, when met, redirects the chatbot user to a person. - -Such an intervention is necessary and crucial as it is common for a chatbot to misunderstand the data being fed to it by the user. For instance, a user may say something out of the chatbot's scope or may present a response in a way that the developer hasn't train the chatbot to recognize. - -#### Translation - -In most cases, a chatbot is built using a single language, for example, English. To reduce chatbot development times, Botpress offers multi-language support for users with a Pro license. This means that people who speak different languages can use the same chatbot employing in-built translation tools. - -### Dialog Manager - -Once you've received some text from a chat platform and transformed that text into structured data, the next component involved is the Dialog Manager (or DM). The role of the DM is to **decide** what the chatbot should do or say next. - -Although the Dialog Manager could theoretically be a bunch of "If" and "Else" statements, this technique does not scale well in practice. Natural dialogs are unpredictable, which increases the complexity of such a state machine exponentially. - -Botpress solves this problem by combining an extensible Visual Flow Editor with a powerful Decision Engine Manager, which significantly eliminates the complexity behind such State Machines. - -#### Visual Flow Editor - -This interface allows you to pre-define how the chatbot responds to a user in terms of the code it will execute and the messages it will display to the user. - -#### Decision Engine - -This robust component decides whether to follow the next step as dictated by the flow editor or give an alternate response, for example, a FAQ from the QnA module or a warning for profane language. - -:::note Upcoming -The Botpress core team is currently working on adding statistical decisions to the Dialog Manager, which will allow you to create even more natural experiences while also simplifying development. For instance, if a user asks a question while interacting with a rules-based workflow, the chatbot will answer that question from the QnA module, then return to the workflow. -::: - -### Extension Points - -Botpress allows for customization by injecting your self-written code. The two main ways to customize Botpress in this way are [by using **actions** and **hooks**](/building-chatbots/flow-editor/actions). - -**Actions** are called by the Dialog Manager (in the context of a conversation) to retrieve data, call external services, or implement custom reply logic. - -**Hooks** are snippets of code that always get executed in the context they are located. For example, snippets in the `on_server_start` directory get executed when Botpress Server starts. - -#### File Structure - -``` -bash -botpress-server -├── bp / bp.exe -│ -└── data -│ │ -│ ├── bots -│ │ └── name-of-your-bot -│ │ ├── bot.config.json # bot-specific configuration -│ │ ├── revisions.json # changelog of bot configurations -│ │ ├── actions <1> -│ │ │ └── custom-code-1.js -│ │ │ └── # etc... -│ │ ├── flows -│ │ └── # etc...(content elements, config, hooks, intents, entities, media, modules, qna) -│ │ -│ |── global -│ | ├── actions <1> # shared actions across all bots -│ | ├── hooks <2> # lifecycle hooks (custom code) -│ | ├── botpress.config.json # configuration across all bots -│ | └── # etc... mostly auto-generated by installed modules -| | -│ └── assets -│ ├── modules <1> # assets related to activated modules -│ ├── ui-admin <2> # # assets related to the main admin user interface -│ ├── ui-studio # assets related to the studio user interface -│ └── # etc... -│ -└── modules -├── nlu.tgz -├── webchat.tgz -└── # etc... -``` - -## Content - -After the Dialog Manager has decided how your chatbot should reply to a specific message, the chatbot needs to know the text or other content of the response message and how it should render it on the target chat platform. - -### Content Element - -A Content Element is a structured object that holds information about what to say (for instance, the text phrase displayed to the user). - -### Content Type - -A Content Type defines the nature of what the chatbot sends. Examples are a text message, an image, and a card. - -### Content Renderer - -A Content Renderer is a function that transforms that structured object into a platform-specific message (for example, making some of the response text bold or italicized on Facebook Messenger). - -The purpose of a Content Renderer is to allow developers to specify how the same information should behave (i.e., be displayed) on different chat platforms. - -## Modules - -A module is an extra component outside of the Botpress Core itself that you can install in your chatbot to add new features to Botpress. Every chatbot uses modules in a way since almost everything in Botpress is a module. - -This modular architecture allows for maximum flexibility and freedom for developers. It also ensures that any customizations are applied without affecting the smooth running of the Botpress Core. - -As a developer, you can create your own [custom module](/building-chatbots/developers/custom-modules) to add extra functionalities to your chatbot. - -## Event Engine Overview - -Below is a complete overview of the components implied in processing an event (ex: a message sent by a user). It is mostly informational, and you won't use most of these components directly. We have included it only to give you an insight into the bigger picture of the elements involved and how they interact. - -![Event engine](/assets/event_enginev2.2.png) diff --git a/docs/quickstart/create-your-first-chatbot.md b/docs/quickstart/create-your-first-chatbot.md new file mode 100644 index 0000000..082da1b --- /dev/null +++ b/docs/quickstart/create-your-first-chatbot.md @@ -0,0 +1,20 @@ +--- +title: 3. Create a bot on studio +slug: /quickstart/create-your-first-chatbot +--- + + + + +![Create a chatbot](/img/docs/create-chatbot.png "Create a chatbot") + +You can start with an Empty Bot or pick one from the templates provided by botpress. + +Click on `Create` button and select the destination folder to save your bots locally. + + + + diff --git a/docs/quickstart/download-studio.md b/docs/quickstart/download-studio.md new file mode 100644 index 0000000..6f2397f --- /dev/null +++ b/docs/quickstart/download-studio.md @@ -0,0 +1,19 @@ +--- +title: 2. Download studio +slug: /quickstart/download-studio +--- +Experience the speed of using Botpress Studio, a continuously enhanced interface designed for all chatbot builder's needs. + +![Sign up](/img/docs/studio.png "signup") + + + +Now that you are [logged in](/login-signup) in to your account. Next, we should download the suitable Botpress Studio version. + +Click the Studio version that is suitable for your OS. The Studio will get downloaded. After it is downloaded, install it and start it. + + diff --git a/docs/quickstart/login.md b/docs/quickstart/login.md new file mode 100644 index 0000000..f4c88bd --- /dev/null +++ b/docs/quickstart/login.md @@ -0,0 +1,53 @@ +--- +title: 1. Login & Signup +slug: /quickstart/login-signup +--- + + +## Login + +To use Botpress Cloud services, you need to log in to the cloud platform. From the cloud platform, you can find other valuable services like + +- Manage Chatbots +- Billing +- Audits +- Settings +- Account Management +- Collaboration + + + +### Available Types of Login + +![Login](/img/docs/login.png "login") + +Botpress provides three types of login that you can use to log in to the Botpress Cloud. + +Go to the [Botpress Cloud Dashboard](https://app.botpress.cloud). + +From there, choose the suitable authentication provider. + +## Sign Up using Email + +![Sign up](/img/docs/signup.png "signup") + +1. Enter your Email ID, password and select your country. +2. Click `Sign Up`. You will be receiving a verification link to your email for your account activation. +3. Sign in with your credentials + + +## Github +You can securely access your account's resources by authenticating through GitHub. + + +![Sign up](/img/docs/github.png "signup") + +Click on `Continue with GitHub` and authorize github permissions. + +## Google + +Signing up with Google means you can log in with your Google account, making it extra easy and secure to log in to Botpress Cloud. \ No newline at end of file diff --git a/docs/quickstart/publishing-your-chatbot.md b/docs/quickstart/publishing-your-chatbot.md new file mode 100644 index 0000000..e514ab1 --- /dev/null +++ b/docs/quickstart/publishing-your-chatbot.md @@ -0,0 +1,17 @@ +--- +title: 4. Publishing your chatbot +slug: /quickstart/publishing-your-chatbot +--- + +![PAT](/img/docs/pat.png) + +Once you're done with making changes to the bot in the studio, click `Publish` button to deploy your chatbot to your cloud dashboard. + +You need to get your Personal Access Token from cloud dashboard. + +![Create a token](/img/docs/pat-created.png) +1. Go to your [Botpress Cloud Dashboard](https://app.botpress.cloud). +On the bottom-left corner, click on your account name and click on `Settings` +1. Now, click on `Generate new token`, give it a name and save it. +2. Copy the generated key token and paste it in your studio. + diff --git a/docs/quickstart/quickstart.md b/docs/quickstart/quickstart.md new file mode 100644 index 0000000..da5fd5d --- /dev/null +++ b/docs/quickstart/quickstart.md @@ -0,0 +1,19 @@ +--- +title: Introduction +slug: / +hide_title: true +--- + + +![Messaging channels](/img/docs/quickstart.png "Quickstart") + +# 🔥 Quickstart + +This guide will help you build and deploy your chatbot to botpress cloud in 5 easy steps. + +1. [Login/Sign Up to Botpress Cloud Dashboard](/quickstart/login-signup) +2. [Downloading Botpress Studio](/quickstart/create-your-first-chatbot) +3. [Creating a chatbot in the Studio](/quickstart/create-your-first-chatbot) +4. [Publishing your chatbot to the cloud dashboard](/quickstart/publishing-your-chatbot) +5. [Testing your chatbot](/quickstart/testing-your-chatbot) + diff --git a/docs/quickstart/testing-your-chatbot.md b/docs/quickstart/testing-your-chatbot.md new file mode 100644 index 0000000..171ec36 --- /dev/null +++ b/docs/quickstart/testing-your-chatbot.md @@ -0,0 +1,22 @@ +--- +title: 5. Testing your chatbot +slug: /quickstart/testing-your-chatbot +--- + +## Testing your Bot + +After the bot is successfully published to the cloud, you can test it from the cloud dashboard. + +![Testing chatbot](/img/docs/testing-chatbot.png) + + +1. Go to the [cloud dashboard](https://app.botpress.cloud) and select your deployed chatbot from `chatbots` tab from sidebar. +2. In the top navigation menu, click on `Chat` +3. Chat with a Hi to test if bot responds back. + +Hurray! 🎉 You've successfully created and published your bot on botpress cloud. + + +:::info +Learn how to [integrate different messaging channels](/messaging-channels/supported-channels) with botpress cloud +::: diff --git a/docusaurus.config.js b/docusaurus.config.js index 54a95cf..61b67b6 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -10,8 +10,15 @@ const config = { onBrokenMarkdownLinks: "warn", favicon: "img/BlackSymbol.svg", organizationName: "Botpress/documentation", // Usually your GitHub org/user name. + plugins: [ + [ + require.resolve('docusaurus-gtm-plugin'), + { + id: 'GTM-5ZGHFCL', // GTM Container ID + } + ] + ], projectName: "botpress/documentation", // Usually your repo name. - presets: [ [ "@docusaurus/preset-classic", @@ -23,10 +30,10 @@ const config = { lastVersion: "current", versions: { current: { - label: "Latest", + label: "Botpress Cloud", }, }, - editUrl: 'https://github.com/botpress/documentation/edit/main', + editUrl: "https://github.com/botpress/documentation/edit/main", }, blog: { showReadingTime: true, @@ -34,179 +41,159 @@ const config = { theme: { customCss: require.resolve("./src/css/custom.css"), }, - gtag: { - trackingID: "GTM-5ZGHFCL", - anonymizeIP: false, - }, }), ], ], - themeConfig: - ({ - announcementBar: { - id: 'announcementBar-2', // Increment on change - content: `Introducing Botpress 🧠 Learning Center 🧠 – A New Place to Master Botpress, Chatbots, and Conversational AI`, - backgroundColor: "#3276ea", - textColor: "#fff" - }, - metadata: [{ name: "botpress, chatbot", content: "documentation, docs" }, {name:"docsearch:docusaurus_tag", content:"docs-default-current"}], - algolia: { - apiKey: process.env.ALGOLIA_API_KEY || "empty", - appId: process.env.ALGOLIA_APP_ID || "empty", - indexName: process.env.ALGOLIA_INDEX || "empty", - contextualSearch: false, //leave it as is. For some reason, activating this adds docusaurus tag facets, thus algolia returns 0 hits. - searchPagePath: 'search', - }, - prism: { - theme: require("./src/utils/prism/lightTheme.js"), - // additionalLanguages: ["bash", "javascript", "jsx", "tsx", "json"], - }, - colorMode: { - defaultMode: "light", - respectPrefersColorScheme: false, - disableSwitch: true - }, - tableOfContents: { - minHeadingLevel: 2, - maxHeadingLevel: 6, + themeConfig: { + announcementBar: { + id: "announcementBar-3", // Increment on change + content: `Welcome to the new Botpress Cloud documentation! If you are looking for the v12 documentation, you can now find it here.`, + backgroundColor: "#3276ea", + textColor: "#fff", + }, + metadata: [ + { name: "botpress, chatbot", content: "documentation, docs" }, + { name: "docsearch:docusaurus_tag", content: "docs-default-current" }, + ], + algolia: { + apiKey: process.env.ALGOLIA_API_KEY || "empty", + appId: process.env.ALGOLIA_APP_ID || "empty", + indexName: process.env.ALGOLIA_INDEX || "empty", + contextualSearch: false, //leave it as is. For some reason, activating this adds docusaurus tag facets, thus algolia returns 0 hits. + searchPagePath: "search", + }, + prism: { + theme: require("./src/utils/prism/lightTheme.js"), + // additionalLanguages: ["bash", "javascript", "jsx", "tsx", "json"], + }, + colorMode: { + defaultMode: "light", + respectPrefersColorScheme: false, + disableSwitch: true, + }, + tableOfContents: { + minHeadingLevel: 2, + maxHeadingLevel: 6, + }, + navbar: { + title: "Docs", + logo: { + alt: "Botpress logo", + src: "img/bp-logo-black.svg", + srcDark: "img/bp-logo-white.png", }, - navbar: { - title: "Docs", - logo: { - alt: "Botpress logo", - src: "img/bp-logo-black.svg", - srcDark: "img/bp-logo-white.png", + hideOnScroll: false, + items: [ + { + type: "doc", + docId: "quickstart/quickstart", + position: "left", + label: "Quickstart", }, - hideOnScroll: true, - items: [ - { - type: "doc", - docId: "overview/what-is-botpress", - position: "left", - label: "Overview", - }, - { - type: "doc", - docId: "building-chatbots/creating-a-new-bot", - position: "left", - label: "Building Chatbots", - }, - { - type: "doc", - docId: "messaging-channels/supported-channels", - position: "left", - label: "Messaging Channels", - }, - { - type: "doc", - docId: "going-to-production/deploy/deploy", - position: "left", - label: "Going to Production", - }, - { - type: "doc", - docId: "chatbot-management/language-understanding/misunderstood", - position: "left", - label: "Chatbot Management", - }, - { - type: "doc", - docId: "enterprise/licensing/enterprise-licensing", - position: "left", - label: "Enterprise", - }, - { - href: "https://botpress.com/reference/", - position: "right", - label: "SDK", - }, - { - type: "docsVersionDropdown", - position: "right", - dropdownItemsAfter: [ - { - href: "http://botpress-docs.s3-website-us-east-1.amazonaws.com/docs/installation/", - label: "v12.26.7", - }, - { - href: "http://botpress-docs.s3-website-us-east-1.amazonaws.com/docs/11.9.6/installation/", - label: "v11.9.6", - }, - { - href: "http://botpress-docs.s3-website-us-east-1.amazonaws.com/versions", - label: "(Older docs) 11.0 to v12.26", - }, - ], - dropdownActiveClassDisabled: true, - }, - { - type: "search", - position: "right", - }, - ], - }, - footer: { - style: "light", - links: [ - { - title: "Docs", - items: [ - { - label: "Overview", - to: "/", - }, - { - label: "Building Chatbots", - to: "building-chatbots/creating-a-new-bot", - }, - { - label: "Messaging Channels", - to: "messaging-channels/supported-channels", - }, - { - label: "Going to Production", - to: "going-to-production/deploy", - }, - { - label: "Chatbot Management", - to: "chatbot-management/language-understanding/misunderstood", - }, - { - label: "Enterprise", - to: "enterprise/licensing/enterprise-licensing", - }, - ], - }, - { - title: "Community", - items: [ - { - label: "Stack Overflow", - href: "https://stackoverflow.com/questions/tagged/botpress", - }, - { - label: "Twitter", - href: "https://twitter.com/getbotpress", - }, - { - label: "Forum", - href: "https://github.com/botpress/botpress/discussions", - }, - ], - }, - { - title: "More", - items: [ - { - label: "GitHub", - href: "https://github.com/botpress/botpress", - }, - ], - }, - ], - copyright: `Copyright © ${new Date().getFullYear()} Botpress, Inc.`, - }, - }), + { + type: "doc", + docId: "messaging-channels/supported-channels", + position: "left", + label: "Messaging Channels", + }, + { + type: "doc", + docId: "management/overview", + position: "left", + label: "Chatbot Management", + }, + { + type: "docsVersionDropdown", + position: "right", + dropdownItemsAfter: [ + { + href: "https://v12.botpress.com/", + label: "v12 (Latest)", + }, + ], + dropdownActiveClassDisabled: true, + }, + { + type: "search", + position: "right", + }, + ], + }, + footer: { + style: "light", + links: [ + { + title: "Learn", + items: [ + { + label: "Quickstart", + to: "/", + }, + { + label: "Messaging Channels", + to: "messaging-channels/supported-channels", + }, + { + label: "Analytics", + to: "analytics/", + }, + { + label: "v12 Docs", + href: "https://v12.botpress.com/", + }, + ], + }, + { + title: "Community", + items: [ + { + label: "Botpress Community", + href: "https://community.botpress.com/", + }, + { + label: "LinkedIn", + href: "https://www.linkedin.com/company/botpress/", + }, + { + label: "Twitter", + href: "https://twitter.com/getbotpress", + }, + ], + }, + { + title: "More", + items: [ + { + label: "Blog", + href: "https://botpress.com/blog", + }, + { + label: "GitHub", + href: "https://github.com/botpress/", + }, + { + label: "Stack Overflow", + href: "https://stackoverflow.com/questions/tagged/botpress", + }, + ], + }, + { + title: "Legal", + items: [ + { + label: "Privacy", + href: "https://botpress.com/privacy", + }, + { + label: "Terms", + href: "https://botpress.com/company/terms", + }, + ], + }, + ], + copyright: `Copyright © ${new Date().getFullYear()} Botpress, Inc.`, + }, + }, } module.exports = config diff --git a/package.json b/package.json index 649f16c..24d2106 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,6 @@ "write-heading-ids": "docusaurus write-heading-ids" }, "dependencies": { - "@docusaurus/core": "^2.0.0-beta.15", "@docusaurus/plugin-google-gtag": "^2.0.0-beta.15", "@docusaurus/preset-classic": "^2.0.0-beta.15", "@docusaurus/theme-classic": "^2.0.0-beta.15", @@ -23,6 +22,7 @@ "@mdx-js/react": "^1.6.21", "@svgr/webpack": "^5.5.0", "clsx": "^1.1.1", + "docusaurus-gtm-plugin": "^0.0.2", "file-loader": "^6.2.0", "front-matter": "^4.0.2", "prism-react-renderer": "^1.2.1", diff --git a/sidebar/analytics.js b/sidebar/analytics.js new file mode 100644 index 0000000..7e9b559 --- /dev/null +++ b/sidebar/analytics.js @@ -0,0 +1,8 @@ +module.exports = [ + { + type: "category", + collapsible: false, + label: "About Analytics", + items: ["analytics/analytics"], + }, +] diff --git a/sidebar/buildingChatbots.js b/sidebar/buildingChatbots.js deleted file mode 100644 index 6c509e8..0000000 --- a/sidebar/buildingChatbots.js +++ /dev/null @@ -1,170 +0,0 @@ -module.exports = [ - { - type: "category", - collapsible: false, - label: "Getting Started", - items: [ - "building-chatbots/creating-a-new-bot", - "building-chatbots/studio-interface" - ] - }, - { - type: "category", - collapsible: false, - label: "Flow Editor", - items: [ - { - type: "category", - collapsible: true, - label: "Flow Lifecycle", - link: { - type: "doc", - id: "building-chatbots/flow-editor/flow-lifecycle/flow-lifecycle" - }, - items: [ - "building-chatbots/flow-editor/flow-lifecycle/nodes-lifecycle", - "building-chatbots/flow-editor/flow-lifecycle/flow-wide-transitions" - ] - }, - { - type: "category", - collapsible: true, - label: "Content Elements", - link: { - type: "doc", - id: "building-chatbots/flow-editor/content-elements/content-elements" - }, - items: [ - "building-chatbots/flow-editor/content-elements/content-text", - "building-chatbots/flow-editor/content-elements/content-image", - "building-chatbots/flow-editor/content-elements/content-video", - "building-chatbots/flow-editor/content-elements/content-card", - "building-chatbots/flow-editor/content-elements/content-carousel", - "building-chatbots/flow-editor/content-elements/custom-content-elements" - ] - }, - { - type: "category", - collapsible: true, - label: "Actions", - link: { - type: "doc", - id: "building-chatbots/flow-editor/actions/actions" - }, - items: [ - "building-chatbots/flow-editor/actions/built-in-actions", - ] - }, - { - type: "category", - collapsible: true, - label: "Skill Nodes", - items: [ - "building-chatbots/flow-editor/skill-nodes/single-choice", - "building-chatbots/flow-editor/skill-nodes/api-call", - "building-chatbots/flow-editor/skill-nodes/slot-filling", - "building-chatbots/flow-editor/skill-nodes/send-email", - "building-chatbots/flow-editor/skill-nodes/custom-skills" - ] - } - ] - }, - { - type: "category", - collapsible: false, - label: "Language Understanding", - items: [ - "building-chatbots/language-understanding/supported-languages", - { - type: "category", - collapsible: true, - label: "Questions & Answers", - link: { - type: "doc", - id: "building-chatbots/language-understanding/questions-&-answers/questions-&-answers" - }, - items: [ - ] - }, - { - type: "category", - collapsible: true, - label: "Intents", - link: { - type: "doc", - id: "building-chatbots/language-understanding/intents/intents" - }, - items: [ - "building-chatbots/language-understanding/intents/slots", - ] - }, - { - type: "category", - collapsible: true, - label: "Entities", - link: { - type: "doc", - id: "building-chatbots/language-understanding/entities/entities" - }, - items: [ - "building-chatbots/language-understanding/entities/system-entities", - "building-chatbots/language-understanding/entities/list-entities", - "building-chatbots/language-understanding/entities/pattern-entities" - ] - }, - "building-chatbots/language-understanding/external-nlu-engines", - "building-chatbots/language-understanding/hosting" - ] - }, - { - type: "category", - collapsible: false, - label: "Testing & Debugging", - items: [ - "building-chatbots/testing-&-debugging/emulator", - "building-chatbots/testing-&-debugging/debugger", - ] - }, - { - type: "category", - collapsible: false, - label: "Memory & Data Persistence", - items: [ - "building-chatbots/memory-&-data-persistence/flow-memory", - "building-chatbots/memory-&-data-persistence/user-memory", - "building-chatbots/memory-&-data-persistence/session-memory", - "building-chatbots/memory-&-data-persistence/general-purpose-storage" - ] - }, - { - type: "category", - collapsible: false, - label: "QnA", - items: [ - { - type: "category", - collapsible: true, - label: "Questions & Answers", - link: { - type: "doc", - id: "building-chatbots/qna/qna-item/qna-item" - }, - items: [ - "building-chatbots/qna/qna-item/question-variations", - "building-chatbots/qna/qna-item/answer-and-alternate", - "building-chatbots/qna/qna-item/context", - ] - } - ] - }, - { - type: "category", - collapsible: false, - label: "Developers", - items: [ - "building-chatbots/developers/database", - "building-chatbots/developers/custom-modules", - "building-chatbots/developers/inter-bot-communication-delegation" - ] - } -] diff --git a/sidebar/chatbotManagement.js b/sidebar/chatbotManagement.js deleted file mode 100644 index 03206ff..0000000 --- a/sidebar/chatbotManagement.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = [ - { - type: "category", - collapsible: false, - label: "Language Understanding", - items: ["chatbot-management/language-understanding/misunderstood"], - }, - { - type: "category", - collapsible: false, - label: "Agent Handover", - items: [ - { - type: "category", - collapsible: true, - label: "Human in the Loop (HITL)", - items: [ - "chatbot-management/agent-handover/human-in-the-loop/hitl", - "chatbot-management/agent-handover/human-in-the-loop/hitlnext", - ], - }, - ], - }, - { - type: "category", - collapsible: false, - label: "Broadcast", - items: ["chatbot-management/broadcast"], - }, -] diff --git a/sidebar/enterprise.js b/sidebar/enterprise.js deleted file mode 100644 index ac710c8..0000000 --- a/sidebar/enterprise.js +++ /dev/null @@ -1,82 +0,0 @@ -module.exports = [ - { - type: "category", - collapsible: false, - label: "Licensing", - items: ["enterprise/licensing/enterprise-licensing"] - }, - { - type: "category", - collapsible: false, - label: "User Management and Security", - items: [ - { - type: "category", - collapsible: true, - label: "Role-Based Access Control (RBAC)", - items: [ - "enterprise/user-management-and-security/role-based-access-control/roles", - "enterprise/user-management-and-security/role-based-access-control/collaborators" - ] - }, - { - type: "category", - collapsible: true, - label: "Authentication Methods", - link: { - type: "doc", - id: "enterprise/user-management-and-security/authentication-methods/authentication-methods" - }, - items: [ - "enterprise/user-management-and-security/authentication-methods/basic-authentication", - "enterprise/user-management-and-security/authentication-methods/saml", - "enterprise/user-management-and-security/authentication-methods/oauth2", - "enterprise/user-management-and-security/authentication-methods/ldap" - ] - }, - { - type: "category", - collapsible: true, - label: "Single-Sign On (SSO)", - items: [ - "enterprise/user-management-and-security/single-sign-on/sso-with-google-oauth2", - "enterprise/user-management-and-security/single-sign-on/sso-with-github-oauth2", - "enterprise/user-management-and-security/single-sign-on/azure-oauth2" - ] - } - ] - }, - { - type: "category", - collapsible: false, - label: "Server and CICD Management", - items: [ - "enterprise/server-and-cicd-management/production-checklist", - "enterprise/server-and-cicd-management/monitoring", - "enterprise/server-and-cicd-management/alerting", - { - type: "category", - collapsible: true, - label: "Pipelines", - items: [ - "enterprise/server-and-cicd-management/pipelines/configure-pipeline", - ] - } - ] - }, - { - type: "category", - collapsible: false, - label: "Advanced Chatbots", - items: [ - { - type: "category", - collapsible: true, - label: "Multi-lingual Chatbots", - items: [ - "enterprise/advanced-chatbots/multi-lingual-chatbots/switching-languages" - ] - } - ] - } -] diff --git a/sidebar/goingToProduction.js b/sidebar/goingToProduction.js deleted file mode 100644 index 3fb6013..0000000 --- a/sidebar/goingToProduction.js +++ /dev/null @@ -1,66 +0,0 @@ -module.exports = [ - { - type: "category", - collapsible: false, - label: "On-Premise Deployment", - items: [ - { - type: "category", - collapsible: true, - label: "Deploy", - link: { - type: "doc", - id: "going-to-production/deploy/deploy", - }, - items: [ - "going-to-production/deploy/linux", - "going-to-production/deploy/windows", - "going-to-production/deploy/aws", - "going-to-production/deploy/digitalocean", - "going-to-production/deploy/docker-compose", - "going-to-production/deploy/enterprise-scaling", - ], - }, - { - type: "category", - collapsible: true, - label: "Hardware & Software Requirements", - link: { - type: "doc", - id: "going-to-production/requirements/requirements", - }, - items: ["going-to-production/requirements/benchmarking"], - }, - "going-to-production/environment-variables", - "going-to-production/updating", - ], - }, - // { - // type: "category", - // collapsible: false, - // label: "Development Lifecycle", - // items: [ - // { - // type: "category", - // collapsible: true, - // label: "Environments", - // items: [ - // "going-to-production/development-lifecycle/environments/read-write-production", - // "going-to-production/development-lifecycle/environments/read-only-production", - // "going-to-production/development-lifecycle/environments/multi-stage-environment", - // ], - // }, - // "going-to-production/development-lifecycle/versioning", - // "going-to-production/development-lifecycle/import-export", - // ], - // }, - // { - // type: "category", - // collapsible: false, - // label: "Migrations", - // items: [ - // "going-to-production/migrations/chatbot-migrations", - // "going-to-production/migrations/environment-migrations", - // ], - // }, -] diff --git a/sidebar/management.js b/sidebar/management.js new file mode 100644 index 0000000..d056411 --- /dev/null +++ b/sidebar/management.js @@ -0,0 +1,17 @@ +module.exports = [ + { + type: "category", + collapsible: false, + label: "Chatbot Management", + items: [ + "management/overview", + "management/details", + "management/messaging", + "management/logs", + "management/config-variables", + "management/analytics", + "management/misunderstood", + "management/chat", + ], + }, +] diff --git a/sidebar/messaging.js b/sidebar/messaging.js index 73dd37a..375e761 100644 --- a/sidebar/messaging.js +++ b/sidebar/messaging.js @@ -3,36 +3,15 @@ module.exports = [ type: "category", collapsible: false, label: "Overview", - items: [ - "messaging-channels/supported-channels", - "messaging-channels/supported-content-types" - ] + items: ["messaging-channels/supported-channels"], }, { type: "category", collapsible: false, - label: "Botpress Webchat", + label: "Webchat", items: [ - { - type: "category", - collapsible: true, - label: "Website Embedding", - link: { - type: "doc", - id: "messaging-channels/botpress-webchat/website-embedding/website-embedding" - }, - items: [ - ] - }, - { - type: "category", - collapsible: true, - label: "Customizations", - items: [ - "messaging-channels/botpress-webchat/customizations/custom-css", - ] - } - ] + "messaging-channels/botpress-webchat/website-embedding/website-embedding", + ], }, { type: "category", @@ -42,8 +21,8 @@ module.exports = [ "messaging-channels/direct-integrations/facebook-messenger", "messaging-channels/direct-integrations/microsoft-teams", "messaging-channels/direct-integrations/slack", - "messaging-channels/direct-integrations/telegram" - ] + "messaging-channels/direct-integrations/telegram", + ], }, { type: "category", @@ -52,13 +31,7 @@ module.exports = [ items: [ "messaging-channels/broker-integrations/twilio", "messaging-channels/broker-integrations/vonage", - "messaging-channels/broker-integrations/smooch-sunshine-conversations" - ] + "messaging-channels/broker-integrations/sunco", + ], }, - { - type: "category", - collapsible: false, - label: "Custom Channels", - items: ["messaging-channels/custom-channels/converse-api"] - } ] diff --git a/sidebar/overview.js b/sidebar/overview.js deleted file mode 100644 index e0f53c9..0000000 --- a/sidebar/overview.js +++ /dev/null @@ -1,30 +0,0 @@ -module.exports = [ - { - type: "category", - collapsible: false, - label: "Getting Started", - items: [ - "overview/what-is-botpress", - { - type: "category", - collapsible: true, - label: "Quickstart", - items: [ - "overview/quickstart/installation", - "overview/quickstart/building-a-bot", - "overview/quickstart/admin-dashboard", - "overview/quickstart/conversation-studio", - ], - }, - "overview/features", - ], - }, - { - type: 'category', - label: 'Cloud', - collapsible: true, - items: [ - "overview/cloud/getting-started", - ] - } -] diff --git a/sidebar/quickstart.js b/sidebar/quickstart.js new file mode 100644 index 0000000..041d8a2 --- /dev/null +++ b/sidebar/quickstart.js @@ -0,0 +1,16 @@ +module.exports = [ + { + type: "category", + collapsible: false, + label: " ", + items: [ + "quickstart/quickstart", + "quickstart/login", + "quickstart/download-studio", + "quickstart/create-your-first-chatbot", + "quickstart/publishing-your-chatbot", + "quickstart/testing-your-chatbot" + ], + }, +] + diff --git a/sidebar/sidebar.js b/sidebar/sidebar.js index 9406bdf..fed655b 100644 --- a/sidebar/sidebar.js +++ b/sidebar/sidebar.js @@ -1,11 +1,13 @@ const fs = require("fs") const path = require("path") -const overview = require("./overview") -const buildingChatbots = require("./buildingChatbots") -const goingToProduction = require("./goingToProduction") +const quickstart = require("./quickstart") +// const overview = require("./overview") +// const buildingChatbots = require("./buildingChatbots") +// const goingToProduction = require("./goingToProduction") const messaging = require("./messaging") -const chatbotManagement = require("./chatbotManagement") -const enterprise = require("./enterprise") +const management = require("./management") +// const chatbotManagement = require("./chatbotManagement") +// const enterprise = require("./enterprise") const fm = require("front-matter") function readDirRecursive(dirPath) { @@ -73,10 +75,7 @@ function filterDraftPages(sidebar) { } module.exports = { - overviewSidebar: filterDraftPages(overview), - buildingChatbotsSidebar: filterDraftPages(buildingChatbots), - goingToProductionSidebar: filterDraftPages(goingToProduction), + managementSidebar: management, messagingSidebar: filterDraftPages(messaging), - chatbotManagementSidebar: filterDraftPages(chatbotManagement), - enterpriseSidebar: filterDraftPages(enterprise), + quickstartSidebar: quickstart } diff --git a/sidebars.js b/sidebars.js deleted file mode 100644 index b37323f..0000000 --- a/sidebars.js +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Creating a sidebar enables you to: - - create an ordered group of docs - - render a sidebar for each doc of that group - - provide next/previous navigation - - The sidebars can be generated from the filesystem, or explicitly defined here. - - Create as many sidebars as you want. - */ - -// @ts-check diff --git a/src/css/custom.css b/src/css/custom.css index 0c49667..08f1e19 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -37,13 +37,13 @@ --ifm-link-hover-decoration: none; } -main p > a, -main li > a { +main p>a, +main li>a { color: #0265d2; } -main p > a:hover, -main li > a:hover { +main p>a:hover, +main li>a:hover { border-bottom: 1px solid #0265d2; } @@ -78,6 +78,9 @@ main li > a:hover { color: #aaaaaa; } + + + .pagination-nav__label { font-size: var(--ifm-h3-font-size); font-weight: var(--ifm-heading-font-weight); @@ -90,8 +93,7 @@ main li > a:hover { flex-grow: 1; line-height: var(--ifm-heading-line-height); padding: var(--ifm-global-spacing); - transition: border-color var(--ifm-transition-fast) - var(--ifm-transition-timing-default); + transition: border-color var(--ifm-transition-fast) var(--ifm-transition-timing-default); } .pagination-nav__sublabel { @@ -135,8 +137,7 @@ html[data-theme="dark"] { --ifm-background-surface-color: #242526; --ifm-hover-overlay: rgba(255, 255, 255, 0.05); --ifm-color-content-secondary: rgba(255, 255, 255, 1); - --ifm-breadcrumb-separator-filter: invert(64%) sepia(11%) saturate(0%) - hue-rotate(149deg) brightness(99%) contrast(95%); + --ifm-breadcrumb-separator-filter: invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%); --ifm-code-background: rgb(51, 52, 55); --ifm-scrollbar-track-background-color: #444444; --ifm-scrollbar-thumb-background-color: #686868; @@ -163,44 +164,34 @@ html[data-theme="dark"] { .markdown h1:first-child { --ifm-h1-font-size: 2rem; - margin-bottom: calc( - var(--ifm-h1-vertical-rhythm-bottom) * var(--ifm-leading) - ); + margin-bottom: calc(var(--ifm-h1-vertical-rhythm-bottom) * var(--ifm-leading)); color: var(--ifm-color-black); } -.markdown > h2 { +.markdown>h2 { --ifm-h2-font-size: 1.5rem; - margin-bottom: calc( - var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading) - ); + margin-bottom: calc(var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading)); margin-top: calc(var(--ifm-h2-vertical-rhythm-top) * var(--ifm-leading)); color: var(--ifm-color-black); } -.markdown > h3 { - --ifm-h2-font-size: 1.2rem; - margin-bottom: calc( - var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading) - ); +.markdown>h3 { + --ifm-h3-font-size: 1.2rem; + margin-bottom: calc(var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading)); margin-top: calc(var(--ifm-h3-vertical-rhythm-top) * var(--ifm-leading)); color: var(--ifm-color-black); } -.markdown > h4 { - --ifm-h2-font-size: 1.1rem; - margin-bottom: calc( - var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading) - ); +.markdown>h4 { + --ifm-h4-font-size: 1.1rem; + margin-bottom: calc(var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading)); margin-top: calc(var(--ifm-h3-vertical-rhythm-top) * var(--ifm-leading)); color: var(--ifm-color-black); } -.markdown > h5 { - --ifm-h3-font-size: 1rem; - margin-bottom: calc( - var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading) - ); +.markdown>h5 { + --ifm-h5-font-size: 1rem; + margin-bottom: calc(var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading)); margin-top: calc(var(--ifm-h3-vertical-rhythm-top) * var(--ifm-leading)); color: var(--ifm-color-black); } @@ -217,12 +208,7 @@ html[data-theme="dark"] { font-size: calc(0.875rem * var(--ifm-button-size-multiplier)); font-weight: var(--ifm-button-font-weight); line-height: 1.5; - padding: calc( - var(--ifm-button-padding-vertical) * var(--ifm-button-size-multiplier) - ) - calc( - var(--ifm-button-padding-horizontal) * var(--ifm-button-size-multiplier) - ); + padding: calc(var(--ifm-button-padding-vertical) * var(--ifm-button-size-multiplier)) calc(var(--ifm-button-padding-horizontal) * var(--ifm-button-size-multiplier)); text-align: center; -webkit-user-select: none; user-select: none; @@ -269,6 +255,7 @@ html[data-theme="dark"] .docusaurus-highlight-code-line { --ifm-alert-foreground-color: var(--ifm-color-secondary-contrast-foreground); --ifm-alert-border-color: var(--ifm-color-secondary-dark); } + /* ====================== Navbar @@ -306,13 +293,11 @@ Side bar section titles ======================= */ -.theme-doc-sidebar-item-category-level-1 > .menu__list-item-collapsible:hover { +.theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible:hover { background: transparent; } -.theme-doc-sidebar-item-category-level-1 - > .menu__list-item-collapsible - > .menu__link { +.theme-doc-sidebar-item-category-level-1>.menu__list-item-collapsible>.menu__link { color: var(--ifm-color-black) !important; font-weight: bolder; } @@ -325,10 +310,6 @@ Side bar section titles color: var(--ifm-color-black); } -.theme-doc-sidebar-container > div { - max-height: none !important; -} - .alert { box-shadow: none; border-radius: 5px; @@ -343,4 +324,4 @@ Side bar section titles .alert--info .admonition-heading svg { color: var(--ifm-color-primary-dark) !important; fill: var(--ifm-color-primary-dark) !important; -} +} \ No newline at end of file diff --git a/src/theme/SearchBar/index.tsx b/src/theme/SearchBar/index.tsx index 6076d1f..2e84811 100644 --- a/src/theme/SearchBar/index.tsx +++ b/src/theme/SearchBar/index.tsx @@ -276,7 +276,6 @@ function DocSearch({ function SearchBar(): JSX.Element { const {siteConfig} = useDocusaurusContext() - const props = { ...(siteConfig.themeConfig.algolia as any), baseUrl: siteConfig.baseUrl diff --git a/static/assets/12693235.jpg b/static/assets/12693235.jpg deleted file mode 100644 index 661e4ba..0000000 Binary files a/static/assets/12693235.jpg and /dev/null differ diff --git a/static/assets/access-debugger.png b/static/assets/access-debugger.png deleted file mode 100644 index eb3b7f1..0000000 Binary files a/static/assets/access-debugger.png and /dev/null differ diff --git a/static/assets/add-content-flow.png b/static/assets/add-content-flow.png deleted file mode 100644 index 18fae80..0000000 Binary files a/static/assets/add-content-flow.png and /dev/null differ diff --git a/static/assets/add-role.png b/static/assets/add-role.png deleted file mode 100644 index 05c7cc7..0000000 Binary files a/static/assets/add-role.png and /dev/null differ diff --git a/static/assets/adding-content.png b/static/assets/adding-content.png deleted file mode 100644 index 4208af1..0000000 Binary files a/static/assets/adding-content.png and /dev/null differ diff --git a/static/assets/admin_modules.png b/static/assets/admin_modules.png deleted file mode 100644 index e1092ba..0000000 Binary files a/static/assets/admin_modules.png and /dev/null differ diff --git a/static/assets/agent-collaborator.png b/static/assets/agent-collaborator.png deleted file mode 100644 index d642715..0000000 Binary files a/static/assets/agent-collaborator.png and /dev/null differ diff --git a/static/assets/agent-interface.png b/static/assets/agent-interface.png deleted file mode 100644 index 6a90249..0000000 Binary files a/static/assets/agent-interface.png and /dev/null differ diff --git a/static/assets/agent-profile.png b/static/assets/agent-profile.png deleted file mode 100644 index c09940c..0000000 Binary files a/static/assets/agent-profile.png and /dev/null differ diff --git a/static/assets/alerting.png b/static/assets/alerting.png deleted file mode 100644 index f25ae14..0000000 Binary files a/static/assets/alerting.png and /dev/null differ diff --git a/static/assets/ask_nickname.jpg b/static/assets/ask_nickname.jpg deleted file mode 100644 index 4d77e54..0000000 Binary files a/static/assets/ask_nickname.jpg and /dev/null differ diff --git a/static/assets/assign-message.png b/static/assets/assign-message.png deleted file mode 100644 index cb94e9f..0000000 Binary files a/static/assets/assign-message.png and /dev/null differ diff --git a/static/assets/audio-emulator.png b/static/assets/audio-emulator.png deleted file mode 100644 index 68158d6..0000000 Binary files a/static/assets/audio-emulator.png and /dev/null differ diff --git a/static/assets/auth-methods.png b/static/assets/auth-methods.png deleted file mode 100644 index 2a53bc3..0000000 Binary files a/static/assets/auth-methods.png and /dev/null differ diff --git a/static/assets/az_2.1_app_creation.png b/static/assets/az_2.1_app_creation.png deleted file mode 100644 index 03e6160..0000000 Binary files a/static/assets/az_2.1_app_creation.png and /dev/null differ diff --git a/static/assets/az_2_register_app.png b/static/assets/az_2_register_app.png deleted file mode 100644 index d046a9c..0000000 Binary files a/static/assets/az_2_register_app.png and /dev/null differ diff --git a/static/assets/az_4_create_secret.png b/static/assets/az_4_create_secret.png deleted file mode 100644 index 0a3a89c..0000000 Binary files a/static/assets/az_4_create_secret.png and /dev/null differ diff --git a/static/assets/az_5_enable_external_auth.png b/static/assets/az_5_enable_external_auth.png deleted file mode 100644 index ded24d6..0000000 Binary files a/static/assets/az_5_enable_external_auth.png and /dev/null differ diff --git a/static/assets/az_5_enable_strategy.png b/static/assets/az_5_enable_strategy.png deleted file mode 100644 index 1d2aceb..0000000 Binary files a/static/assets/az_5_enable_strategy.png and /dev/null differ diff --git a/static/assets/az_6_configure_callback.png b/static/assets/az_6_configure_callback.png deleted file mode 100644 index 366b8e2..0000000 Binary files a/static/assets/az_6_configure_callback.png and /dev/null differ diff --git a/static/assets/b-i-chat.png b/static/assets/b-i-chat.png deleted file mode 100644 index 510dd18..0000000 Binary files a/static/assets/b-i-chat.png and /dev/null differ diff --git a/static/assets/b-i-interface.png b/static/assets/b-i-interface.png deleted file mode 100644 index 5aeb8f3..0000000 Binary files a/static/assets/b-i-interface.png and /dev/null differ diff --git a/static/assets/bot_carouselexample_1573577470073.tgz b/static/assets/bot_carouselexample_1573577470073.tgz deleted file mode 100644 index f8acfd0..0000000 Binary files a/static/assets/bot_carouselexample_1573577470073.tgz and /dev/null differ diff --git a/static/assets/botpress-enterprise-feature.png b/static/assets/botpress-enterprise-feature.png deleted file mode 100644 index 9262235..0000000 Binary files a/static/assets/botpress-enterprise-feature.png and /dev/null differ diff --git a/static/assets/bp-account-menu.jpg b/static/assets/bp-account-menu.jpg deleted file mode 100644 index 095c75d..0000000 Binary files a/static/assets/bp-account-menu.jpg and /dev/null differ diff --git a/static/assets/bp-cluster.png b/static/assets/bp-cluster.png deleted file mode 100644 index cfe2e5d..0000000 Binary files a/static/assets/bp-cluster.png and /dev/null differ diff --git a/static/assets/bp-customize-license.jpg b/static/assets/bp-customize-license.jpg deleted file mode 100644 index 44e2405..0000000 Binary files a/static/assets/bp-customize-license.jpg and /dev/null differ diff --git a/static/assets/bp-keys-active.jpg b/static/assets/bp-keys-active.jpg deleted file mode 100644 index dbff62a..0000000 Binary files a/static/assets/bp-keys-active.jpg and /dev/null differ diff --git a/static/assets/bp-keys-not-active.jpg b/static/assets/bp-keys-not-active.jpg deleted file mode 100644 index 3733d52..0000000 Binary files a/static/assets/bp-keys-not-active.jpg and /dev/null differ diff --git a/static/assets/bp-server-settings.jpg b/static/assets/bp-server-settings.jpg deleted file mode 100644 index 7f1ec19..0000000 Binary files a/static/assets/bp-server-settings.jpg and /dev/null differ diff --git a/static/assets/branding.png b/static/assets/branding.png deleted file mode 100644 index 3d33831..0000000 Binary files a/static/assets/branding.png and /dev/null differ diff --git a/static/assets/broadcast.png b/static/assets/broadcast.png deleted file mode 100644 index 56fb6bc..0000000 Binary files a/static/assets/broadcast.png and /dev/null differ diff --git a/static/assets/call-api-skill-flow.png b/static/assets/call-api-skill-flow.png deleted file mode 100644 index 1ee4eaa..0000000 Binary files a/static/assets/call-api-skill-flow.png and /dev/null differ diff --git a/static/assets/call-api-skill-headers.png b/static/assets/call-api-skill-headers.png deleted file mode 100644 index 6e26fec..0000000 Binary files a/static/assets/call-api-skill-headers.png and /dev/null differ diff --git a/static/assets/call-api-skill-memory.png b/static/assets/call-api-skill-memory.png deleted file mode 100644 index 5c4f464..0000000 Binary files a/static/assets/call-api-skill-memory.png and /dev/null differ diff --git a/static/assets/call-api-skill-template.png b/static/assets/call-api-skill-template.png deleted file mode 100644 index a63f86f..0000000 Binary files a/static/assets/call-api-skill-template.png and /dev/null differ diff --git a/static/assets/call-api-skill.png b/static/assets/call-api-skill.png deleted file mode 100644 index 2b03c07..0000000 Binary files a/static/assets/call-api-skill.png and /dev/null differ diff --git a/static/assets/card-example.png b/static/assets/card-example.png deleted file mode 100644 index acc524c..0000000 Binary files a/static/assets/card-example.png and /dev/null differ diff --git a/static/assets/card.jpg b/static/assets/card.jpg deleted file mode 100644 index 52171ee..0000000 Binary files a/static/assets/card.jpg and /dev/null differ diff --git a/static/assets/carousel-postback-bot.png b/static/assets/carousel-postback-bot.png deleted file mode 100644 index c68feeb..0000000 Binary files a/static/assets/carousel-postback-bot.png and /dev/null differ diff --git a/static/assets/carousel-postback-emulator.png b/static/assets/carousel-postback-emulator.png deleted file mode 100644 index da4052e..0000000 Binary files a/static/assets/carousel-postback-emulator.png and /dev/null differ diff --git a/static/assets/carousel.jpg b/static/assets/carousel.jpg deleted file mode 100644 index 3f2a685..0000000 Binary files a/static/assets/carousel.jpg and /dev/null differ diff --git a/static/assets/change-role.png b/static/assets/change-role.png deleted file mode 100644 index 19c6dbf..0000000 Binary files a/static/assets/change-role.png and /dev/null differ diff --git a/static/assets/choice-skill-entry.png b/static/assets/choice-skill-entry.png deleted file mode 100644 index e06d31d..0000000 Binary files a/static/assets/choice-skill-entry.png and /dev/null differ diff --git a/static/assets/choice-skill-transitions.png b/static/assets/choice-skill-transitions.png deleted file mode 100644 index 11deb3a..0000000 Binary files a/static/assets/choice-skill-transitions.png and /dev/null differ diff --git a/static/assets/choice-skill-tries.png b/static/assets/choice-skill-tries.png deleted file mode 100644 index f0df093..0000000 Binary files a/static/assets/choice-skill-tries.png and /dev/null differ diff --git a/static/assets/cli-help.png b/static/assets/cli-help.png deleted file mode 100644 index 28abc88..0000000 Binary files a/static/assets/cli-help.png and /dev/null differ diff --git a/static/assets/cloud/.swp b/static/assets/cloud/.swp deleted file mode 100644 index 8540fcc..0000000 Binary files a/static/assets/cloud/.swp and /dev/null differ diff --git a/static/assets/cloud/api-key-telegram-studio.png b/static/assets/cloud/api-key-telegram-studio.png deleted file mode 100644 index 1d01a30..0000000 Binary files a/static/assets/cloud/api-key-telegram-studio.png and /dev/null differ diff --git a/static/assets/cloud/api-key-telegram.png b/static/assets/cloud/api-key-telegram.png deleted file mode 100644 index 2a9c237..0000000 Binary files a/static/assets/cloud/api-key-telegram.png and /dev/null differ diff --git a/static/assets/cloud/cloud-beta-create-bot.png b/static/assets/cloud/cloud-beta-create-bot.png deleted file mode 100644 index fc753da..0000000 Binary files a/static/assets/cloud/cloud-beta-create-bot.png and /dev/null differ diff --git a/static/assets/cloud/cloud-key.png b/static/assets/cloud/cloud-key.png deleted file mode 100644 index c978859..0000000 Binary files a/static/assets/cloud/cloud-key.png and /dev/null differ diff --git a/static/assets/cloud/deploy-to-cloud.png b/static/assets/cloud/deploy-to-cloud.png deleted file mode 100644 index 5bf34b9..0000000 Binary files a/static/assets/cloud/deploy-to-cloud.png and /dev/null differ diff --git a/static/assets/cloud/deploy.png b/static/assets/cloud/deploy.png deleted file mode 100644 index 5bf34b9..0000000 Binary files a/static/assets/cloud/deploy.png and /dev/null differ diff --git a/static/assets/cloud/first-chatbot.jpg b/static/assets/cloud/first-chatbot.jpg deleted file mode 100644 index fc429af..0000000 Binary files a/static/assets/cloud/first-chatbot.jpg and /dev/null differ diff --git a/static/assets/cloud/login.png b/static/assets/cloud/login.png deleted file mode 100644 index 03aad1f..0000000 Binary files a/static/assets/cloud/login.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-api-key-telegram-0.png b/static/assets/cloud/mask-chop-api-key-telegram-0.png deleted file mode 100644 index 9e1a2d0..0000000 Binary files a/static/assets/cloud/mask-chop-api-key-telegram-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-api-key-telegram-1.png b/static/assets/cloud/mask-chop-api-key-telegram-1.png deleted file mode 100644 index bf4d190..0000000 Binary files a/static/assets/cloud/mask-chop-api-key-telegram-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-api-key-telegram-studio-0.png b/static/assets/cloud/mask-chop-api-key-telegram-studio-0.png deleted file mode 100644 index bdc45ef..0000000 Binary files a/static/assets/cloud/mask-chop-api-key-telegram-studio-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-api-key-telegram-studio-1.png b/static/assets/cloud/mask-chop-api-key-telegram-studio-1.png deleted file mode 100644 index 0408901..0000000 Binary files a/static/assets/cloud/mask-chop-api-key-telegram-studio-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-api-key-telegram-studio.png b/static/assets/cloud/mask-chop-api-key-telegram-studio.png deleted file mode 100644 index 3afd02f..0000000 Binary files a/static/assets/cloud/mask-chop-api-key-telegram-studio.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-api-key-telegram.png b/static/assets/cloud/mask-chop-api-key-telegram.png deleted file mode 100644 index e826fb8..0000000 Binary files a/static/assets/cloud/mask-chop-api-key-telegram.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-cloud-key-0.png b/static/assets/cloud/mask-chop-cloud-key-0.png deleted file mode 100644 index 6bd1014..0000000 Binary files a/static/assets/cloud/mask-chop-cloud-key-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-cloud-key-1.png b/static/assets/cloud/mask-chop-cloud-key-1.png deleted file mode 100644 index 6801939..0000000 Binary files a/static/assets/cloud/mask-chop-cloud-key-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-cloud-key.png b/static/assets/cloud/mask-chop-cloud-key.png deleted file mode 100644 index ca3a7e6..0000000 Binary files a/static/assets/cloud/mask-chop-cloud-key.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-deploy-to-cloud-0.png b/static/assets/cloud/mask-chop-deploy-to-cloud-0.png deleted file mode 100644 index 31b97ff..0000000 Binary files a/static/assets/cloud/mask-chop-deploy-to-cloud-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-deploy-to-cloud-1.png b/static/assets/cloud/mask-chop-deploy-to-cloud-1.png deleted file mode 100644 index d9c6ddd..0000000 Binary files a/static/assets/cloud/mask-chop-deploy-to-cloud-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-deploy-to-cloud.png b/static/assets/cloud/mask-chop-deploy-to-cloud.png deleted file mode 100644 index 40346ba..0000000 Binary files a/static/assets/cloud/mask-chop-deploy-to-cloud.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-dst-0.png b/static/assets/cloud/mask-chop-dst-0.png deleted file mode 100644 index 7627b53..0000000 Binary files a/static/assets/cloud/mask-chop-dst-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-dst-1.png b/static/assets/cloud/mask-chop-dst-1.png deleted file mode 100644 index e9331c2..0000000 Binary files a/static/assets/cloud/mask-chop-dst-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-dst.png b/static/assets/cloud/mask-chop-dst.png deleted file mode 100644 index 39f0c7b..0000000 Binary files a/static/assets/cloud/mask-chop-dst.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-first-chatbot-0.jpg b/static/assets/cloud/mask-chop-first-chatbot-0.jpg deleted file mode 100644 index 867add7..0000000 Binary files a/static/assets/cloud/mask-chop-first-chatbot-0.jpg and /dev/null differ diff --git a/static/assets/cloud/mask-chop-first-chatbot-1.jpg b/static/assets/cloud/mask-chop-first-chatbot-1.jpg deleted file mode 100644 index 81dba33..0000000 Binary files a/static/assets/cloud/mask-chop-first-chatbot-1.jpg and /dev/null differ diff --git a/static/assets/cloud/mask-chop-first-chatbot.jpg b/static/assets/cloud/mask-chop-first-chatbot.jpg deleted file mode 100644 index c7dde35..0000000 Binary files a/static/assets/cloud/mask-chop-first-chatbot.jpg and /dev/null differ diff --git a/static/assets/cloud/mask-chop-login-0.png b/static/assets/cloud/mask-chop-login-0.png deleted file mode 100644 index de9a698..0000000 Binary files a/static/assets/cloud/mask-chop-login-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-login-1.png b/static/assets/cloud/mask-chop-login-1.png deleted file mode 100644 index d1f863c..0000000 Binary files a/static/assets/cloud/mask-chop-login-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-login.png b/static/assets/cloud/mask-chop-login.png deleted file mode 100644 index e0c3b00..0000000 Binary files a/static/assets/cloud/mask-chop-login.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-mask-0.png b/static/assets/cloud/mask-chop-mask-0.png deleted file mode 100644 index 29683a5..0000000 Binary files a/static/assets/cloud/mask-chop-mask-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-mask-1.png b/static/assets/cloud/mask-chop-mask-1.png deleted file mode 100644 index bc47591..0000000 Binary files a/static/assets/cloud/mask-chop-mask-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-mask.png b/static/assets/cloud/mask-chop-mask.png deleted file mode 100644 index fc646a0..0000000 Binary files a/static/assets/cloud/mask-chop-mask.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-result-0.png b/static/assets/cloud/mask-chop-result-0.png deleted file mode 100644 index 8c2cf52..0000000 Binary files a/static/assets/cloud/mask-chop-result-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-result-1.png b/static/assets/cloud/mask-chop-result-1.png deleted file mode 100644 index f90cd0c..0000000 Binary files a/static/assets/cloud/mask-chop-result-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-result.png b/static/assets/cloud/mask-chop-result.png deleted file mode 100644 index b5d3a10..0000000 Binary files a/static/assets/cloud/mask-chop-result.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-studio-key-0.png b/static/assets/cloud/mask-chop-studio-key-0.png deleted file mode 100644 index c95388b..0000000 Binary files a/static/assets/cloud/mask-chop-studio-key-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-studio-key-1.png b/static/assets/cloud/mask-chop-studio-key-1.png deleted file mode 100644 index 1f1417f..0000000 Binary files a/static/assets/cloud/mask-chop-studio-key-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-studio-key.png b/static/assets/cloud/mask-chop-studio-key.png deleted file mode 100644 index 922bddb..0000000 Binary files a/static/assets/cloud/mask-chop-studio-key.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-telegram-0.png b/static/assets/cloud/mask-chop-telegram-0.png deleted file mode 100644 index e0e4986..0000000 Binary files a/static/assets/cloud/mask-chop-telegram-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-telegram-1.png b/static/assets/cloud/mask-chop-telegram-1.png deleted file mode 100644 index b62d216..0000000 Binary files a/static/assets/cloud/mask-chop-telegram-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-telegram.png b/static/assets/cloud/mask-chop-telegram.png deleted file mode 100644 index cfc53f8..0000000 Binary files a/static/assets/cloud/mask-chop-telegram.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-train-chatbot-0.png b/static/assets/cloud/mask-chop-train-chatbot-0.png deleted file mode 100644 index d3e7400..0000000 Binary files a/static/assets/cloud/mask-chop-train-chatbot-0.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-train-chatbot-1.png b/static/assets/cloud/mask-chop-train-chatbot-1.png deleted file mode 100644 index 9f8b4bf..0000000 Binary files a/static/assets/cloud/mask-chop-train-chatbot-1.png and /dev/null differ diff --git a/static/assets/cloud/mask-chop-train-chatbot.png b/static/assets/cloud/mask-chop-train-chatbot.png deleted file mode 100644 index 34a141d..0000000 Binary files a/static/assets/cloud/mask-chop-train-chatbot.png and /dev/null differ diff --git a/static/assets/cloud/studio-key.png b/static/assets/cloud/studio-key.png deleted file mode 100644 index 98b5597..0000000 Binary files a/static/assets/cloud/studio-key.png and /dev/null differ diff --git a/static/assets/cloud/telegram.png b/static/assets/cloud/telegram.png deleted file mode 100644 index 4512d40..0000000 Binary files a/static/assets/cloud/telegram.png and /dev/null differ diff --git a/static/assets/cloud/train-chatbot.png b/static/assets/cloud/train-chatbot.png deleted file mode 100644 index b893ca5..0000000 Binary files a/static/assets/cloud/train-chatbot.png and /dev/null differ diff --git a/static/assets/collaborators.png b/static/assets/collaborators.png deleted file mode 100644 index cbc76cc..0000000 Binary files a/static/assets/collaborators.png and /dev/null differ diff --git a/static/assets/comments.png b/static/assets/comments.png deleted file mode 100644 index 2b63b84..0000000 Binary files a/static/assets/comments.png and /dev/null differ diff --git a/static/assets/components.png b/static/assets/components.png deleted file mode 100644 index 95027d4..0000000 Binary files a/static/assets/components.png and /dev/null differ diff --git a/static/assets/content-interface.png b/static/assets/content-interface.png deleted file mode 100644 index 01a0799..0000000 Binary files a/static/assets/content-interface.png and /dev/null differ diff --git a/static/assets/content-text-example.png b/static/assets/content-text-example.png deleted file mode 100644 index 3c3dfbb..0000000 Binary files a/static/assets/content-text-example.png and /dev/null differ diff --git a/static/assets/conversation-studio-intro.png b/static/assets/conversation-studio-intro.png deleted file mode 100644 index 338fd86..0000000 Binary files a/static/assets/conversation-studio-intro.png and /dev/null differ diff --git a/static/assets/create-bot.png b/static/assets/create-bot.png deleted file mode 100644 index 61bda18..0000000 Binary files a/static/assets/create-bot.png and /dev/null differ diff --git a/static/assets/create-new.png b/static/assets/create-new.png deleted file mode 100644 index f3163e8..0000000 Binary files a/static/assets/create-new.png and /dev/null differ diff --git a/static/assets/custom-analytics-actions.png b/static/assets/custom-analytics-actions.png deleted file mode 100644 index 30c4a7e..0000000 Binary files a/static/assets/custom-analytics-actions.png and /dev/null differ diff --git a/static/assets/custom-analytics-count.png b/static/assets/custom-analytics-count.png deleted file mode 100644 index 7a1543d..0000000 Binary files a/static/assets/custom-analytics-count.png and /dev/null differ diff --git a/static/assets/custom-analytics-countuniq.png b/static/assets/custom-analytics-countuniq.png deleted file mode 100644 index e3c2e31..0000000 Binary files a/static/assets/custom-analytics-countuniq.png and /dev/null differ diff --git a/static/assets/custom-analytics-percent.png b/static/assets/custom-analytics-percent.png deleted file mode 100644 index 8ac1334..0000000 Binary files a/static/assets/custom-analytics-percent.png and /dev/null differ diff --git a/static/assets/custom-analytics-piechart.png b/static/assets/custom-analytics-piechart.png deleted file mode 100644 index e8c8e28..0000000 Binary files a/static/assets/custom-analytics-piechart.png and /dev/null differ diff --git a/static/assets/custom-entities.png b/static/assets/custom-entities.png deleted file mode 100644 index 9f64496..0000000 Binary files a/static/assets/custom-entities.png and /dev/null differ diff --git a/static/assets/debugger.png b/static/assets/debugger.png deleted file mode 100644 index facd353..0000000 Binary files a/static/assets/debugger.png and /dev/null differ diff --git a/static/assets/debugging.png b/static/assets/debugging.png deleted file mode 100644 index 8470434..0000000 Binary files a/static/assets/debugging.png and /dev/null differ diff --git a/static/assets/dev-pipeline.png b/static/assets/dev-pipeline.png deleted file mode 100644 index a4a0409..0000000 Binary files a/static/assets/dev-pipeline.png and /dev/null differ diff --git a/static/assets/docker-new-instance.png b/static/assets/docker-new-instance.png deleted file mode 100644 index ff470fd..0000000 Binary files a/static/assets/docker-new-instance.png and /dev/null differ diff --git a/static/assets/docker-restart.png b/static/assets/docker-restart.png deleted file mode 100644 index 1531e33..0000000 Binary files a/static/assets/docker-restart.png and /dev/null differ diff --git a/static/assets/dropdown.jpg b/static/assets/dropdown.jpg deleted file mode 100644 index b319cf3..0000000 Binary files a/static/assets/dropdown.jpg and /dev/null differ diff --git a/static/assets/emulator_icons.png b/static/assets/emulator_icons.png deleted file mode 100644 index 83228a5..0000000 Binary files a/static/assets/emulator_icons.png and /dev/null differ diff --git a/static/assets/emulator_win_inspector.png b/static/assets/emulator_win_inspector.png deleted file mode 100644 index 95691f0..0000000 Binary files a/static/assets/emulator_win_inspector.png and /dev/null differ diff --git a/static/assets/emulator_win_newsession.jpg b/static/assets/emulator_win_newsession.jpg deleted file mode 100644 index 4609528..0000000 Binary files a/static/assets/emulator_win_newsession.jpg and /dev/null differ diff --git a/static/assets/emulator_win_raw_json.png b/static/assets/emulator_win_raw_json.png deleted file mode 100644 index 60549c6..0000000 Binary files a/static/assets/emulator_win_raw_json.png and /dev/null differ diff --git a/static/assets/emulator_win_statusbar.jpg b/static/assets/emulator_win_statusbar.jpg deleted file mode 100644 index 5bf3021..0000000 Binary files a/static/assets/emulator_win_statusbar.jpg and /dev/null differ diff --git a/static/assets/enable-module.png b/static/assets/enable-module.png deleted file mode 100644 index ab1be5c..0000000 Binary files a/static/assets/enable-module.png and /dev/null differ diff --git a/static/assets/entity-input-panel.PNG b/static/assets/entity-input-panel.PNG deleted file mode 100644 index 3c56e05..0000000 Binary files a/static/assets/entity-input-panel.PNG and /dev/null differ diff --git a/static/assets/faq-append-context.png b/static/assets/faq-append-context.png deleted file mode 100644 index 311fc18..0000000 Binary files a/static/assets/faq-append-context.png and /dev/null differ diff --git a/static/assets/faq-qna-category.png b/static/assets/faq-qna-category.png deleted file mode 100644 index 7dbce3b..0000000 Binary files a/static/assets/faq-qna-category.png and /dev/null differ diff --git a/static/assets/faq-qna-new-context.png b/static/assets/faq-qna-new-context.png deleted file mode 100644 index 0a67c21..0000000 Binary files a/static/assets/faq-qna-new-context.png and /dev/null differ diff --git a/static/assets/file.jpg b/static/assets/file.jpg deleted file mode 100644 index 42825db..0000000 Binary files a/static/assets/file.jpg and /dev/null differ diff --git a/static/assets/file_upload.png b/static/assets/file_upload.png deleted file mode 100644 index fd71b21..0000000 Binary files a/static/assets/file_upload.png and /dev/null differ diff --git a/static/assets/first-run.png b/static/assets/first-run.png deleted file mode 100644 index 34b3145..0000000 Binary files a/static/assets/first-run.png and /dev/null differ diff --git a/static/assets/flow-memory-action.jpg b/static/assets/flow-memory-action.jpg deleted file mode 100644 index ad0375a..0000000 Binary files a/static/assets/flow-memory-action.jpg and /dev/null differ diff --git a/static/assets/flow-memory-action.png b/static/assets/flow-memory-action.png deleted file mode 100644 index 04409fe..0000000 Binary files a/static/assets/flow-memory-action.png and /dev/null differ diff --git a/static/assets/flow-nlu-transition.jpg b/static/assets/flow-nlu-transition.jpg deleted file mode 100644 index 41fab11..0000000 Binary files a/static/assets/flow-nlu-transition.jpg and /dev/null differ diff --git a/static/assets/flow_node.png b/static/assets/flow_node.png deleted file mode 100644 index 64e006f..0000000 Binary files a/static/assets/flow_node.png and /dev/null differ diff --git a/static/assets/flow_page.png b/static/assets/flow_page.png deleted file mode 100644 index 4c3663d..0000000 Binary files a/static/assets/flow_page.png and /dev/null differ diff --git a/static/assets/flow_wide_onreceive.png b/static/assets/flow_wide_onreceive.png deleted file mode 100644 index 7d042c7..0000000 Binary files a/static/assets/flow_wide_onreceive.png and /dev/null differ diff --git a/static/assets/flows.png b/static/assets/flows.png deleted file mode 100644 index 4e56508..0000000 Binary files a/static/assets/flows.png and /dev/null differ diff --git a/static/assets/function_params.png b/static/assets/function_params.png deleted file mode 100644 index 291fce6..0000000 Binary files a/static/assets/function_params.png and /dev/null differ diff --git a/static/assets/get-quote.png b/static/assets/get-quote.png deleted file mode 100644 index 390e7a1..0000000 Binary files a/static/assets/get-quote.png and /dev/null differ diff --git a/static/assets/getUserTag.jpg b/static/assets/getUserTag.jpg deleted file mode 100644 index fac2d2f..0000000 Binary files a/static/assets/getUserTag.jpg and /dev/null differ diff --git a/static/assets/getUserTagNode.jpg b/static/assets/getUserTagNode.jpg deleted file mode 100644 index 296ac63..0000000 Binary files a/static/assets/getUserTagNode.jpg and /dev/null differ diff --git a/static/assets/gith_1_create_app.png b/static/assets/gith_1_create_app.png deleted file mode 100644 index 9d92343..0000000 Binary files a/static/assets/gith_1_create_app.png and /dev/null differ diff --git a/static/assets/gith_2_create_credentials.png b/static/assets/gith_2_create_credentials.png deleted file mode 100644 index 6d6dfe3..0000000 Binary files a/static/assets/gith_2_create_credentials.png and /dev/null differ diff --git a/static/assets/goog_1_create_oauth2_creds.png b/static/assets/goog_1_create_oauth2_creds.png deleted file mode 100644 index 8e34ec2..0000000 Binary files a/static/assets/goog_1_create_oauth2_creds.png and /dev/null differ diff --git a/static/assets/goog_1a_create_oauth2_creds.png b/static/assets/goog_1a_create_oauth2_creds.png deleted file mode 100644 index c556265..0000000 Binary files a/static/assets/goog_1a_create_oauth2_creds.png and /dev/null differ diff --git a/static/assets/goog_1b_create_oauth2_creds.png b/static/assets/goog_1b_create_oauth2_creds.png deleted file mode 100644 index 0b8c6d9..0000000 Binary files a/static/assets/goog_1b_create_oauth2_creds.png and /dev/null differ diff --git a/static/assets/goog_2_configure_client.png b/static/assets/goog_2_configure_client.png deleted file mode 100644 index 633e5fa..0000000 Binary files a/static/assets/goog_2_configure_client.png and /dev/null differ diff --git a/static/assets/handoff-action.png b/static/assets/handoff-action.png deleted file mode 100644 index 9d68f4b..0000000 Binary files a/static/assets/handoff-action.png and /dev/null differ diff --git a/static/assets/hitl-config.png b/static/assets/hitl-config.png deleted file mode 100644 index 039a242..0000000 Binary files a/static/assets/hitl-config.png and /dev/null differ diff --git a/static/assets/hitl-interface.png b/static/assets/hitl-interface.png deleted file mode 100644 index c6970a0..0000000 Binary files a/static/assets/hitl-interface.png and /dev/null differ diff --git a/static/assets/hitl_pause.png b/static/assets/hitl_pause.png deleted file mode 100644 index 85423fd..0000000 Binary files a/static/assets/hitl_pause.png and /dev/null differ diff --git a/static/assets/hld.png b/static/assets/hld.png deleted file mode 100644 index f8683ec..0000000 Binary files a/static/assets/hld.png and /dev/null differ diff --git a/static/assets/http-interfaces.png b/static/assets/http-interfaces.png deleted file mode 100644 index bb9ef8e..0000000 Binary files a/static/assets/http-interfaces.png and /dev/null differ diff --git a/static/assets/i18n-configs.png b/static/assets/i18n-configs.png deleted file mode 100644 index 32b0cb1..0000000 Binary files a/static/assets/i18n-configs.png and /dev/null differ diff --git a/static/assets/i18n-edit-content.png b/static/assets/i18n-edit-content.png deleted file mode 100644 index eb79ea3..0000000 Binary files a/static/assets/i18n-edit-content.png and /dev/null differ diff --git a/static/assets/i18n-edited-content.png b/static/assets/i18n-edited-content.png deleted file mode 100644 index 5cfbde7..0000000 Binary files a/static/assets/i18n-edited-content.png and /dev/null differ diff --git a/static/assets/i18n-missing-translation.png b/static/assets/i18n-missing-translation.png deleted file mode 100644 index 798f011..0000000 Binary files a/static/assets/i18n-missing-translation.png and /dev/null differ diff --git a/static/assets/i18n-switch-lang.png b/static/assets/i18n-switch-lang.png deleted file mode 100644 index b5d541f..0000000 Binary files a/static/assets/i18n-switch-lang.png and /dev/null differ diff --git a/static/assets/image-example.png b/static/assets/image-example.png deleted file mode 100644 index 392a885..0000000 Binary files a/static/assets/image-example.png and /dev/null differ diff --git a/static/assets/image.jpg b/static/assets/image.jpg deleted file mode 100644 index f695b08..0000000 Binary files a/static/assets/image.jpg and /dev/null differ diff --git a/static/assets/image_upload.png b/static/assets/image_upload.png deleted file mode 100644 index f296c52..0000000 Binary files a/static/assets/image_upload.png and /dev/null differ diff --git a/static/assets/info-button.png b/static/assets/info-button.png deleted file mode 100644 index 86f9c40..0000000 Binary files a/static/assets/info-button.png and /dev/null differ diff --git a/static/assets/intent-creation.png b/static/assets/intent-creation.png deleted file mode 100644 index 04532a4..0000000 Binary files a/static/assets/intent-creation.png and /dev/null differ diff --git a/static/assets/intent-matching-node.png b/static/assets/intent-matching-node.png deleted file mode 100644 index ca3545b..0000000 Binary files a/static/assets/intent-matching-node.png and /dev/null differ diff --git a/static/assets/intent-matching-qna-cancel.png b/static/assets/intent-matching-qna-cancel.png deleted file mode 100644 index f8ac9af..0000000 Binary files a/static/assets/intent-matching-qna-cancel.png and /dev/null differ diff --git a/static/assets/intent-matching-qna-conversation.png b/static/assets/intent-matching-qna-conversation.png deleted file mode 100644 index 3c418e7..0000000 Binary files a/static/assets/intent-matching-qna-conversation.png and /dev/null differ diff --git a/static/assets/intent-matching-qna-flow.png b/static/assets/intent-matching-qna-flow.png deleted file mode 100644 index 40e8358..0000000 Binary files a/static/assets/intent-matching-qna-flow.png and /dev/null differ diff --git a/static/assets/intent-matching-qna-new.png b/static/assets/intent-matching-qna-new.png deleted file mode 100644 index 1e1d1f1..0000000 Binary files a/static/assets/intent-matching-qna-new.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-chain-conversation.png b/static/assets/intent-matching-slot-chain-conversation.png deleted file mode 100644 index dff9f93..0000000 Binary files a/static/assets/intent-matching-slot-chain-conversation.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-chain-flow.png b/static/assets/intent-matching-slot-chain-flow.png deleted file mode 100644 index 510b361..0000000 Binary files a/static/assets/intent-matching-slot-chain-flow.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-chain-intents.png b/static/assets/intent-matching-slot-chain-intents.png deleted file mode 100644 index 9cf4353..0000000 Binary files a/static/assets/intent-matching-slot-chain-intents.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-conversation.png b/static/assets/intent-matching-slot-conversation.png deleted file mode 100644 index 7923ad9..0000000 Binary files a/static/assets/intent-matching-slot-conversation.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-flow.png b/static/assets/intent-matching-slot-flow.png deleted file mode 100644 index e1070a5..0000000 Binary files a/static/assets/intent-matching-slot-flow.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-intents.png b/static/assets/intent-matching-slot-intents.png deleted file mode 100644 index 12623c0..0000000 Binary files a/static/assets/intent-matching-slot-intents.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-skill.png b/static/assets/intent-matching-slot-skill.png deleted file mode 100644 index 0870554..0000000 Binary files a/static/assets/intent-matching-slot-skill.png and /dev/null differ diff --git a/static/assets/intent-matching-slot-text.png b/static/assets/intent-matching-slot-text.png deleted file mode 100644 index dfcb29f..0000000 Binary files a/static/assets/intent-matching-slot-text.png and /dev/null differ diff --git a/static/assets/intent-matching-switch-case.png b/static/assets/intent-matching-switch-case.png deleted file mode 100644 index 406a98c..0000000 Binary files a/static/assets/intent-matching-switch-case.png and /dev/null differ diff --git a/static/assets/intent-matching-switch-conversation.png b/static/assets/intent-matching-switch-conversation.png deleted file mode 100644 index c494544..0000000 Binary files a/static/assets/intent-matching-switch-conversation.png and /dev/null differ diff --git a/static/assets/intent-matching-switch-intents.png b/static/assets/intent-matching-switch-intents.png deleted file mode 100644 index 66aa532..0000000 Binary files a/static/assets/intent-matching-switch-intents.png and /dev/null differ diff --git a/static/assets/intent-matching-transition.png b/static/assets/intent-matching-transition.png deleted file mode 100644 index 058a533..0000000 Binary files a/static/assets/intent-matching-transition.png and /dev/null differ diff --git a/static/assets/labels.png b/static/assets/labels.png deleted file mode 100644 index 287d95e..0000000 Binary files a/static/assets/labels.png and /dev/null differ diff --git a/static/assets/messenger-admin-config.png b/static/assets/messenger-admin-config.png deleted file mode 100644 index 9a240fc..0000000 Binary files a/static/assets/messenger-admin-config.png and /dev/null differ diff --git a/static/assets/messenger-app.png b/static/assets/messenger-app.png deleted file mode 100644 index 9fb90ad..0000000 Binary files a/static/assets/messenger-app.png and /dev/null differ diff --git a/static/assets/messenger-page.png b/static/assets/messenger-page.png deleted file mode 100644 index de363ca..0000000 Binary files a/static/assets/messenger-page.png and /dev/null differ diff --git a/static/assets/messenger-setup.png b/static/assets/messenger-setup.png deleted file mode 100644 index 50fe8bc..0000000 Binary files a/static/assets/messenger-setup.png and /dev/null differ diff --git a/static/assets/messenger-webhook.png b/static/assets/messenger-webhook.png deleted file mode 100644 index 1ccb975..0000000 Binary files a/static/assets/messenger-webhook.png and /dev/null differ diff --git a/static/assets/mis-interface-new-item.png b/static/assets/mis-interface-new-item.png deleted file mode 100644 index 98577dc..0000000 Binary files a/static/assets/mis-interface-new-item.png and /dev/null differ diff --git a/static/assets/mis-solve-ammend.png b/static/assets/mis-solve-ammend.png deleted file mode 100644 index c138318..0000000 Binary files a/static/assets/mis-solve-ammend.png and /dev/null differ diff --git a/static/assets/misundertood-interface.png b/static/assets/misundertood-interface.png deleted file mode 100644 index f307094..0000000 Binary files a/static/assets/misundertood-interface.png and /dev/null differ diff --git a/static/assets/modules-sidebar.png b/static/assets/modules-sidebar.png deleted file mode 100644 index b6885c4..0000000 Binary files a/static/assets/modules-sidebar.png and /dev/null differ diff --git a/static/assets/modules-views.gif b/static/assets/modules-views.gif deleted file mode 100644 index 1c43892..0000000 Binary files a/static/assets/modules-views.gif and /dev/null differ diff --git a/static/assets/monitoring.png b/static/assets/monitoring.png deleted file mode 100644 index b627b38..0000000 Binary files a/static/assets/monitoring.png and /dev/null differ diff --git a/static/assets/music.jpg b/static/assets/music.jpg deleted file mode 100644 index 44d2fd6..0000000 Binary files a/static/assets/music.jpg and /dev/null differ diff --git a/static/assets/new-broadcast.png b/static/assets/new-broadcast.png deleted file mode 100644 index 773c657..0000000 Binary files a/static/assets/new-broadcast.png and /dev/null differ diff --git a/static/assets/new_bot.png b/static/assets/new_bot.png deleted file mode 100644 index 879418c..0000000 Binary files a/static/assets/new_bot.png and /dev/null differ diff --git a/static/assets/newqna.png b/static/assets/newqna.png deleted file mode 100644 index c95fd85..0000000 Binary files a/static/assets/newqna.png and /dev/null differ diff --git a/static/assets/nicknameCondition1.jpg b/static/assets/nicknameCondition1.jpg deleted file mode 100644 index de3a8f8..0000000 Binary files a/static/assets/nicknameCondition1.jpg and /dev/null differ diff --git a/static/assets/nicknameCondition2.jpg b/static/assets/nicknameCondition2.jpg deleted file mode 100644 index 77afbfe..0000000 Binary files a/static/assets/nicknameCondition2.jpg and /dev/null differ diff --git a/static/assets/nlu-create-entity.png b/static/assets/nlu-create-entity.png deleted file mode 100644 index 8cb1248..0000000 Binary files a/static/assets/nlu-create-entity.png and /dev/null differ diff --git a/static/assets/nlu-create-slot.png b/static/assets/nlu-create-slot.png deleted file mode 100644 index fac9328..0000000 Binary files a/static/assets/nlu-create-slot.png and /dev/null differ diff --git a/static/assets/nlu-emulator.png b/static/assets/nlu-emulator.png deleted file mode 100644 index 3be65cc..0000000 Binary files a/static/assets/nlu-emulator.png and /dev/null differ diff --git a/static/assets/nlu-intent.png b/static/assets/nlu-intent.png deleted file mode 100644 index 12623c0..0000000 Binary files a/static/assets/nlu-intent.png and /dev/null differ diff --git a/static/assets/nlu-intents-submenu.png b/static/assets/nlu-intents-submenu.png deleted file mode 100644 index d138016..0000000 Binary files a/static/assets/nlu-intents-submenu.png and /dev/null differ diff --git a/static/assets/nlu-language-emulator.png b/static/assets/nlu-language-emulator.png deleted file mode 100644 index 883b6ae..0000000 Binary files a/static/assets/nlu-language-emulator.png and /dev/null differ diff --git a/static/assets/nlu-language-message.png b/static/assets/nlu-language-message.png deleted file mode 100644 index 9eac03e..0000000 Binary files a/static/assets/nlu-language-message.png and /dev/null differ diff --git a/static/assets/nlu-language-raw-expression.png b/static/assets/nlu-language-raw-expression.png deleted file mode 100644 index 6ff83a0..0000000 Binary files a/static/assets/nlu-language-raw-expression.png and /dev/null differ diff --git a/static/assets/nlu-language-set-variable.png b/static/assets/nlu-language-set-variable.png deleted file mode 100644 index 9978a22..0000000 Binary files a/static/assets/nlu-language-set-variable.png and /dev/null differ diff --git a/static/assets/nlu-list-entity.png b/static/assets/nlu-list-entity.png deleted file mode 100644 index 15e1ef7..0000000 Binary files a/static/assets/nlu-list-entity.png and /dev/null differ diff --git a/static/assets/nlu-overview.png b/static/assets/nlu-overview.png deleted file mode 100644 index b0f8698..0000000 Binary files a/static/assets/nlu-overview.png and /dev/null differ diff --git a/static/assets/nlu-pattern-entity.png b/static/assets/nlu-pattern-entity.png deleted file mode 100644 index d297078..0000000 Binary files a/static/assets/nlu-pattern-entity.png and /dev/null differ diff --git a/static/assets/nlu-raw-expression.png b/static/assets/nlu-raw-expression.png deleted file mode 100644 index 6ff83a0..0000000 Binary files a/static/assets/nlu-raw-expression.png and /dev/null differ diff --git a/static/assets/nlu-tag-slot.png b/static/assets/nlu-tag-slot.png deleted file mode 100644 index e99c4bd..0000000 Binary files a/static/assets/nlu-tag-slot.png and /dev/null differ diff --git a/static/assets/nlu-variable.png b/static/assets/nlu-variable.png deleted file mode 100644 index f02904d..0000000 Binary files a/static/assets/nlu-variable.png and /dev/null differ diff --git a/static/assets/nluConsole.jpg b/static/assets/nluConsole.jpg deleted file mode 100644 index e532d56..0000000 Binary files a/static/assets/nluConsole.jpg and /dev/null differ diff --git a/static/assets/nluFlow.jpg b/static/assets/nluFlow.jpg deleted file mode 100644 index 029020c..0000000 Binary files a/static/assets/nluFlow.jpg and /dev/null differ diff --git a/static/assets/node_blocking.png b/static/assets/node_blocking.png deleted file mode 100644 index bca1263..0000000 Binary files a/static/assets/node_blocking.png and /dev/null differ diff --git a/static/assets/node_transition.png b/static/assets/node_transition.png deleted file mode 100644 index 2573e46..0000000 Binary files a/static/assets/node_transition.png and /dev/null differ diff --git a/static/assets/online.gif b/static/assets/online.gif deleted file mode 100644 index 0165af9..0000000 Binary files a/static/assets/online.gif and /dev/null differ diff --git a/static/assets/otherwiseCondition.jpg b/static/assets/otherwiseCondition.jpg deleted file mode 100644 index 65c1040..0000000 Binary files a/static/assets/otherwiseCondition.jpg and /dev/null differ diff --git a/static/assets/otherwiseConditionResult.jpg b/static/assets/otherwiseConditionResult.jpg deleted file mode 100644 index 1dfd67b..0000000 Binary files a/static/assets/otherwiseConditionResult.jpg and /dev/null differ diff --git a/static/assets/password-change.png b/static/assets/password-change.png deleted file mode 100644 index 7da3d03..0000000 Binary files a/static/assets/password-change.png and /dev/null differ diff --git a/static/assets/performances-benchmark.png b/static/assets/performances-benchmark.png deleted file mode 100644 index e828c37..0000000 Binary files a/static/assets/performances-benchmark.png and /dev/null differ diff --git a/static/assets/pipeline.png b/static/assets/pipeline.png deleted file mode 100644 index 635f283..0000000 Binary files a/static/assets/pipeline.png and /dev/null differ diff --git a/static/assets/pipeline_promote.png b/static/assets/pipeline_promote.png deleted file mode 100644 index be783d0..0000000 Binary files a/static/assets/pipeline_promote.png and /dev/null differ diff --git a/static/assets/pipeline_promoted_copy.png b/static/assets/pipeline_promoted_copy.png deleted file mode 100644 index bc4d354..0000000 Binary files a/static/assets/pipeline_promoted_copy.png and /dev/null differ diff --git a/static/assets/pipeline_promoted_move.png b/static/assets/pipeline_promoted_move.png deleted file mode 100644 index a3bb163..0000000 Binary files a/static/assets/pipeline_promoted_move.png and /dev/null differ diff --git a/static/assets/pizzabot.gif b/static/assets/pizzabot.gif deleted file mode 100644 index f143333..0000000 Binary files a/static/assets/pizzabot.gif and /dev/null differ diff --git a/static/assets/qna-overview.png b/static/assets/qna-overview.png deleted file mode 100644 index b0f6288..0000000 Binary files a/static/assets/qna-overview.png and /dev/null differ diff --git a/static/assets/qnaInterface.png b/static/assets/qnaInterface.png deleted file mode 100644 index bf651ba..0000000 Binary files a/static/assets/qnaInterface.png and /dev/null differ diff --git a/static/assets/rbac-roles.png b/static/assets/rbac-roles.png deleted file mode 100644 index dcabeb3..0000000 Binary files a/static/assets/rbac-roles.png and /dev/null differ diff --git a/static/assets/rbac-success.png b/static/assets/rbac-success.png deleted file mode 100644 index 5e727df..0000000 Binary files a/static/assets/rbac-success.png and /dev/null differ diff --git a/static/assets/rbac.png b/static/assets/rbac.png deleted file mode 100644 index a3e1912..0000000 Binary files a/static/assets/rbac.png and /dev/null differ diff --git a/static/assets/restart-cog.png b/static/assets/restart-cog.png deleted file mode 100644 index a496fb1..0000000 Binary files a/static/assets/restart-cog.png and /dev/null differ diff --git a/static/assets/roles.png b/static/assets/roles.png deleted file mode 100644 index f7196ab..0000000 Binary files a/static/assets/roles.png and /dev/null differ diff --git a/static/assets/server-start.png b/static/assets/server-start.png deleted file mode 100644 index f3269c5..0000000 Binary files a/static/assets/server-start.png and /dev/null differ diff --git a/static/assets/shortcuts.png b/static/assets/shortcuts.png deleted file mode 100644 index 4d336fe..0000000 Binary files a/static/assets/shortcuts.png and /dev/null differ diff --git a/static/assets/single-choice.jpg b/static/assets/single-choice.jpg deleted file mode 100644 index 7832e39..0000000 Binary files a/static/assets/single-choice.jpg and /dev/null differ diff --git a/static/assets/single-choice.png b/static/assets/single-choice.png deleted file mode 100644 index f553e2a..0000000 Binary files a/static/assets/single-choice.png and /dev/null differ diff --git a/static/assets/skills/choice-answer.png b/static/assets/skills/choice-answer.png deleted file mode 100644 index 6e6d4eb..0000000 Binary files a/static/assets/skills/choice-answer.png and /dev/null differ diff --git a/static/assets/skills/choice-generating.png b/static/assets/skills/choice-generating.png deleted file mode 100644 index 8960d5f..0000000 Binary files a/static/assets/skills/choice-generating.png and /dev/null differ diff --git a/static/assets/skills/choice.png b/static/assets/skills/choice.png deleted file mode 100644 index 7766e5e..0000000 Binary files a/static/assets/skills/choice.png and /dev/null differ diff --git a/static/assets/skills/intent.png b/static/assets/skills/intent.png deleted file mode 100644 index c4cf85c..0000000 Binary files a/static/assets/skills/intent.png and /dev/null differ diff --git a/static/assets/skillsEdit.jpg b/static/assets/skillsEdit.jpg deleted file mode 100644 index e04f3ce..0000000 Binary files a/static/assets/skillsEdit.jpg and /dev/null differ diff --git a/static/assets/skillsEdit.png b/static/assets/skillsEdit.png deleted file mode 100644 index 8f9efd3..0000000 Binary files a/static/assets/skillsEdit.png and /dev/null differ diff --git a/static/assets/skillsMenu.jpg b/static/assets/skillsMenu.jpg deleted file mode 100644 index 2a6fb72..0000000 Binary files a/static/assets/skillsMenu.jpg and /dev/null differ diff --git a/static/assets/skillsMenu.png b/static/assets/skillsMenu.png deleted file mode 100644 index c1af061..0000000 Binary files a/static/assets/skillsMenu.png and /dev/null differ diff --git a/static/assets/skillsPanel.jpg b/static/assets/skillsPanel.jpg deleted file mode 100644 index 207b409..0000000 Binary files a/static/assets/skillsPanel.jpg and /dev/null differ diff --git a/static/assets/slack-botToken.png b/static/assets/slack-botToken.png deleted file mode 100644 index 4b150af..0000000 Binary files a/static/assets/slack-botToken.png and /dev/null differ diff --git a/static/assets/slack-secret.png b/static/assets/slack-secret.png deleted file mode 100644 index 91fb816..0000000 Binary files a/static/assets/slack-secret.png and /dev/null differ diff --git a/static/assets/slot-extraction-emulator.png b/static/assets/slot-extraction-emulator.png deleted file mode 100644 index 876c428..0000000 Binary files a/static/assets/slot-extraction-emulator.png and /dev/null differ diff --git a/static/assets/slot-mix.png b/static/assets/slot-mix.png deleted file mode 100644 index 71319a6..0000000 Binary files a/static/assets/slot-mix.png and /dev/null differ diff --git a/static/assets/slot-skill-convo.png b/static/assets/slot-skill-convo.png deleted file mode 100644 index 8019899..0000000 Binary files a/static/assets/slot-skill-convo.png and /dev/null differ diff --git a/static/assets/slot-skill-flow.png b/static/assets/slot-skill-flow.png deleted file mode 100644 index f517472..0000000 Binary files a/static/assets/slot-skill-flow.png and /dev/null differ diff --git a/static/assets/slot-skill-intents.png b/static/assets/slot-skill-intents.png deleted file mode 100644 index cd43e2e..0000000 Binary files a/static/assets/slot-skill-intents.png and /dev/null differ diff --git a/static/assets/slot-skill-outcomes.png b/static/assets/slot-skill-outcomes.png deleted file mode 100644 index d7daf60..0000000 Binary files a/static/assets/slot-skill-outcomes.png and /dev/null differ diff --git a/static/assets/slot-skill-overview.png b/static/assets/slot-skill-overview.png deleted file mode 100644 index b40b904..0000000 Binary files a/static/assets/slot-skill-overview.png and /dev/null differ diff --git a/static/assets/slots-fill-mix.png b/static/assets/slots-fill-mix.png deleted file mode 100644 index 6528f09..0000000 Binary files a/static/assets/slots-fill-mix.png and /dev/null differ diff --git a/static/assets/slots-mix.png b/static/assets/slots-mix.png deleted file mode 100644 index 835d4a3..0000000 Binary files a/static/assets/slots-mix.png and /dev/null differ diff --git a/static/assets/sso-google.png b/static/assets/sso-google.png deleted file mode 100644 index ffc4643..0000000 Binary files a/static/assets/sso-google.png and /dev/null differ diff --git a/static/assets/stateLifetime.jpg b/static/assets/stateLifetime.jpg deleted file mode 100644 index 182e63d..0000000 Binary files a/static/assets/stateLifetime.jpg and /dev/null differ diff --git a/static/assets/stateLifetime.png b/static/assets/stateLifetime.png deleted file mode 100644 index 30ad5d7..0000000 Binary files a/static/assets/stateLifetime.png and /dev/null differ diff --git a/static/assets/studio-qna-chat.jpg b/static/assets/studio-qna-chat.jpg deleted file mode 100644 index e3fc7c0..0000000 Binary files a/static/assets/studio-qna-chat.jpg and /dev/null differ diff --git a/static/assets/studio-toolbar.png b/static/assets/studio-toolbar.png deleted file mode 100644 index 52db8b4..0000000 Binary files a/static/assets/studio-toolbar.png and /dev/null differ diff --git a/static/assets/studio.png b/static/assets/studio.png deleted file mode 100644 index b367a14..0000000 Binary files a/static/assets/studio.png and /dev/null differ diff --git a/static/assets/test_website.png b/static/assets/test_website.png deleted file mode 100644 index 2d6f18e..0000000 Binary files a/static/assets/test_website.png and /dev/null differ diff --git a/static/assets/text-example.png b/static/assets/text-example.png deleted file mode 100644 index be1af30..0000000 Binary files a/static/assets/text-example.png and /dev/null differ diff --git a/static/assets/text.jpg b/static/assets/text.jpg deleted file mode 100644 index cca4ae4..0000000 Binary files a/static/assets/text.jpg and /dev/null differ diff --git a/static/assets/transfer-message.png b/static/assets/transfer-message.png deleted file mode 100644 index b796674..0000000 Binary files a/static/assets/transfer-message.png and /dev/null differ diff --git a/static/assets/translation.png b/static/assets/translation.png deleted file mode 100644 index 1b8ef66..0000000 Binary files a/static/assets/translation.png and /dev/null differ diff --git a/static/assets/transportConnectionString.png b/static/assets/transportConnectionString.png deleted file mode 100644 index 4ee320c..0000000 Binary files a/static/assets/transportConnectionString.png and /dev/null differ diff --git a/static/assets/tutorial-call-api-action.png b/static/assets/tutorial-call-api-action.png deleted file mode 100644 index 2890a3b..0000000 Binary files a/static/assets/tutorial-call-api-action.png and /dev/null differ diff --git a/static/assets/tutorial-call-api-chat.png b/static/assets/tutorial-call-api-chat.png deleted file mode 100644 index 692f031..0000000 Binary files a/static/assets/tutorial-call-api-chat.png and /dev/null differ diff --git a/static/assets/tutorial-call-api-element.png b/static/assets/tutorial-call-api-element.png deleted file mode 100644 index 11bc9ff..0000000 Binary files a/static/assets/tutorial-call-api-element.png and /dev/null differ diff --git a/static/assets/tutorial-call-api-node-properties.png b/static/assets/tutorial-call-api-node-properties.png deleted file mode 100644 index 2798f44..0000000 Binary files a/static/assets/tutorial-call-api-node-properties.png and /dev/null differ diff --git a/static/assets/tutorials_interbot-diagram.png b/static/assets/tutorials_interbot-diagram.png deleted file mode 100644 index 2da53be..0000000 Binary files a/static/assets/tutorials_interbot-diagram.png and /dev/null differ diff --git a/static/assets/tutorials_interbot-example.png b/static/assets/tutorials_interbot-example.png deleted file mode 100644 index 606dff7..0000000 Binary files a/static/assets/tutorials_interbot-example.png and /dev/null differ diff --git a/static/assets/tutorials_interbot-flow.png b/static/assets/tutorials_interbot-flow.png deleted file mode 100644 index 7b92079..0000000 Binary files a/static/assets/tutorials_interbot-flow.png and /dev/null differ diff --git a/static/assets/type_indicators.png b/static/assets/type_indicators.png deleted file mode 100644 index ee5712e..0000000 Binary files a/static/assets/type_indicators.png and /dev/null differ diff --git a/static/assets/user-name-message.png b/static/assets/user-name-message.png deleted file mode 100644 index bf87c8e..0000000 Binary files a/static/assets/user-name-message.png and /dev/null differ diff --git a/static/assets/user-profile.png b/static/assets/user-profile.png deleted file mode 100644 index ca42c63..0000000 Binary files a/static/assets/user-profile.png and /dev/null differ diff --git a/static/assets/versioning-pull.png b/static/assets/versioning-pull.png deleted file mode 100644 index f42e604..0000000 Binary files a/static/assets/versioning-pull.png and /dev/null differ diff --git a/static/assets/video-example.png b/static/assets/video-example.png deleted file mode 100644 index 4b55c55..0000000 Binary files a/static/assets/video-example.png and /dev/null differ diff --git a/static/assets/video.jpg b/static/assets/video.jpg deleted file mode 100644 index f1824b5..0000000 Binary files a/static/assets/video.jpg and /dev/null differ diff --git a/static/assets/webchat-bot-info.png b/static/assets/webchat-bot-info.png deleted file mode 100644 index a6b1bbe..0000000 Binary files a/static/assets/webchat-bot-info.png and /dev/null differ diff --git a/static/assets/webchat-customization.png b/static/assets/webchat-customization.png deleted file mode 100644 index d79a832..0000000 Binary files a/static/assets/webchat-customization.png and /dev/null differ diff --git a/static/assets/workflow-breakdown.png b/static/assets/workflow-breakdown.png deleted file mode 100644 index a69508c..0000000 Binary files a/static/assets/workflow-breakdown.png and /dev/null differ diff --git a/static/assets/workspace_bot.png b/static/assets/workspace_bot.png deleted file mode 100644 index 196f99f..0000000 Binary files a/static/assets/workspace_bot.png and /dev/null differ diff --git a/static/img/botpress_chatbot.html b/static/img/botpress_chatbot.html new file mode 100644 index 0000000..106eced --- /dev/null +++ b/static/img/botpress_chatbot.html @@ -0,0 +1,26 @@ + + + + + + + Botpress Webchat Example + + + + + +

+ Botpress Cloud x Webchat +

+ + \ No newline at end of file diff --git a/static/img/docs/analytics.png b/static/img/docs/analytics.png new file mode 100644 index 0000000..bba0a49 Binary files /dev/null and b/static/img/docs/analytics.png differ diff --git a/static/img/docs/bp-logo-white.png b/static/img/docs/bp-logo-white.png new file mode 100644 index 0000000..42700ac Binary files /dev/null and b/static/img/docs/bp-logo-white.png differ diff --git a/static/img/docs/calendar.png b/static/img/docs/calendar.png new file mode 100644 index 0000000..9fa5d16 Binary files /dev/null and b/static/img/docs/calendar.png differ diff --git a/static/img/docs/channels.png b/static/img/docs/channels.png new file mode 100644 index 0000000..5365753 Binary files /dev/null and b/static/img/docs/channels.png differ diff --git a/static/img/docs/chatbot_additional_details.png b/static/img/docs/chatbot_additional_details.png new file mode 100644 index 0000000..468e91b Binary files /dev/null and b/static/img/docs/chatbot_additional_details.png differ diff --git a/static/img/docs/chatbot_charts.png b/static/img/docs/chatbot_charts.png new file mode 100644 index 0000000..4e2d592 Binary files /dev/null and b/static/img/docs/chatbot_charts.png differ diff --git a/static/img/docs/chatbot_chat.png b/static/img/docs/chatbot_chat.png new file mode 100644 index 0000000..aadffe3 Binary files /dev/null and b/static/img/docs/chatbot_chat.png differ diff --git a/static/img/docs/chatbot_config.png b/static/img/docs/chatbot_config.png new file mode 100644 index 0000000..c5122a4 Binary files /dev/null and b/static/img/docs/chatbot_config.png differ diff --git a/static/img/docs/chatbot_config_steps.png b/static/img/docs/chatbot_config_steps.png new file mode 100644 index 0000000..6062c67 Binary files /dev/null and b/static/img/docs/chatbot_config_steps.png differ diff --git a/static/img/docs/chatbot_cv.png b/static/img/docs/chatbot_cv.png new file mode 100644 index 0000000..0be1fc5 Binary files /dev/null and b/static/img/docs/chatbot_cv.png differ diff --git a/static/img/docs/chatbot_description.png b/static/img/docs/chatbot_description.png new file mode 100644 index 0000000..216cccd Binary files /dev/null and b/static/img/docs/chatbot_description.png differ diff --git a/static/img/docs/chatbot_details.png b/static/img/docs/chatbot_details.png new file mode 100644 index 0000000..3738b0c Binary files /dev/null and b/static/img/docs/chatbot_details.png differ diff --git a/static/img/docs/chatbot_log.png b/static/img/docs/chatbot_log.png new file mode 100644 index 0000000..8748c57 Binary files /dev/null and b/static/img/docs/chatbot_log.png differ diff --git a/static/img/docs/chatbot_logs.png b/static/img/docs/chatbot_logs.png new file mode 100644 index 0000000..52a4900 Binary files /dev/null and b/static/img/docs/chatbot_logs.png differ diff --git a/static/img/docs/chatbot_logs_2.png b/static/img/docs/chatbot_logs_2.png new file mode 100644 index 0000000..e6b5098 Binary files /dev/null and b/static/img/docs/chatbot_logs_2.png differ diff --git a/static/img/docs/chatbot_management_banner.png b/static/img/docs/chatbot_management_banner.png new file mode 100644 index 0000000..2566d39 Binary files /dev/null and b/static/img/docs/chatbot_management_banner.png differ diff --git a/static/img/docs/chatbot_messenger.png b/static/img/docs/chatbot_messenger.png new file mode 100644 index 0000000..24ae681 Binary files /dev/null and b/static/img/docs/chatbot_messenger.png differ diff --git a/static/img/docs/chatbot_mis.png b/static/img/docs/chatbot_mis.png new file mode 100644 index 0000000..ca85236 Binary files /dev/null and b/static/img/docs/chatbot_mis.png differ diff --git a/static/img/docs/chatbot_miss.png b/static/img/docs/chatbot_miss.png new file mode 100644 index 0000000..df2ee3c Binary files /dev/null and b/static/img/docs/chatbot_miss.png differ diff --git a/static/img/docs/chatbot_miss3.png b/static/img/docs/chatbot_miss3.png new file mode 100644 index 0000000..58f7179 Binary files /dev/null and b/static/img/docs/chatbot_miss3.png differ diff --git a/static/img/docs/create-bot-banner.png b/static/img/docs/create-bot-banner.png new file mode 100644 index 0000000..60db206 Binary files /dev/null and b/static/img/docs/create-bot-banner.png differ diff --git a/static/img/docs/create-chatbot.png b/static/img/docs/create-chatbot.png new file mode 100644 index 0000000..90d54e1 Binary files /dev/null and b/static/img/docs/create-chatbot.png differ diff --git a/static/img/docs/custom-config.png b/static/img/docs/custom-config.png new file mode 100644 index 0000000..07541aa Binary files /dev/null and b/static/img/docs/custom-config.png differ diff --git a/static/img/docs/docusaurus.png b/static/img/docs/docusaurus.png new file mode 100644 index 0000000..f458149 Binary files /dev/null and b/static/img/docs/docusaurus.png differ diff --git a/static/img/docs/downloads.png b/static/img/docs/downloads.png new file mode 100644 index 0000000..5398e24 Binary files /dev/null and b/static/img/docs/downloads.png differ diff --git a/static/assets/event_enginev2.2.png b/static/img/docs/event_enginev2.2.png similarity index 100% rename from static/assets/event_enginev2.2.png rename to static/img/docs/event_enginev2.2.png diff --git a/static/img/docs/github.png b/static/img/docs/github.png new file mode 100644 index 0000000..335b6d6 Binary files /dev/null and b/static/img/docs/github.png differ diff --git a/static/img/docs/login.png b/static/img/docs/login.png new file mode 100644 index 0000000..738fec7 Binary files /dev/null and b/static/img/docs/login.png differ diff --git a/static/img/docs/messaging-banner.png b/static/img/docs/messaging-banner.png new file mode 100644 index 0000000..96fc8cd Binary files /dev/null and b/static/img/docs/messaging-banner.png differ diff --git a/static/img/docs/messenger-banner.png b/static/img/docs/messenger-banner.png new file mode 100644 index 0000000..38620c7 Binary files /dev/null and b/static/img/docs/messenger-banner.png differ diff --git a/static/img/docs/messenger-config.png b/static/img/docs/messenger-config.png new file mode 100644 index 0000000..d95a63d Binary files /dev/null and b/static/img/docs/messenger-config.png differ diff --git a/static/img/docs/pat-created.png b/static/img/docs/pat-created.png new file mode 100644 index 0000000..6982535 Binary files /dev/null and b/static/img/docs/pat-created.png differ diff --git a/static/img/docs/pat.png b/static/img/docs/pat.png new file mode 100644 index 0000000..c45e477 Binary files /dev/null and b/static/img/docs/pat.png differ diff --git a/static/img/docs/profile.png b/static/img/docs/profile.png new file mode 100644 index 0000000..3464835 Binary files /dev/null and b/static/img/docs/profile.png differ diff --git a/static/img/docs/quickstart.png b/static/img/docs/quickstart.png new file mode 100644 index 0000000..d8327f8 Binary files /dev/null and b/static/img/docs/quickstart.png differ diff --git a/static/img/docs/sample.png b/static/img/docs/sample.png new file mode 100644 index 0000000..17a03a3 Binary files /dev/null and b/static/img/docs/sample.png differ diff --git a/static/img/docs/signup.png b/static/img/docs/signup.png new file mode 100644 index 0000000..d3b330c Binary files /dev/null and b/static/img/docs/signup.png differ diff --git a/static/img/docs/slack-banner.png b/static/img/docs/slack-banner.png new file mode 100644 index 0000000..e1c8397 Binary files /dev/null and b/static/img/docs/slack-banner.png differ diff --git a/static/img/docs/slack-config.png b/static/img/docs/slack-config.png new file mode 100644 index 0000000..dcc937d Binary files /dev/null and b/static/img/docs/slack-config.png differ diff --git a/static/img/docs/smooch-banner.png b/static/img/docs/smooch-banner.png new file mode 100644 index 0000000..673fbe7 Binary files /dev/null and b/static/img/docs/smooch-banner.png differ diff --git a/static/img/docs/studio.png b/static/img/docs/studio.png new file mode 100644 index 0000000..aae097f Binary files /dev/null and b/static/img/docs/studio.png differ diff --git a/static/img/docs/sunco-config.png b/static/img/docs/sunco-config.png new file mode 100644 index 0000000..70d7d80 Binary files /dev/null and b/static/img/docs/sunco-config.png differ diff --git a/static/img/docs/teams-banner.png b/static/img/docs/teams-banner.png new file mode 100644 index 0000000..df28c6b Binary files /dev/null and b/static/img/docs/teams-banner.png differ diff --git a/static/img/docs/teams-config.png b/static/img/docs/teams-config.png new file mode 100644 index 0000000..89510fe Binary files /dev/null and b/static/img/docs/teams-config.png differ diff --git a/static/img/docs/telegram-banner.png b/static/img/docs/telegram-banner.png new file mode 100644 index 0000000..c4434cc Binary files /dev/null and b/static/img/docs/telegram-banner.png differ diff --git a/static/img/docs/telegram-config.png b/static/img/docs/telegram-config.png new file mode 100644 index 0000000..47c4fd7 Binary files /dev/null and b/static/img/docs/telegram-config.png differ diff --git a/static/img/docs/testing-chatbot.png b/static/img/docs/testing-chatbot.png new file mode 100644 index 0000000..5b58131 Binary files /dev/null and b/static/img/docs/testing-chatbot.png differ diff --git a/static/img/docs/twilio-banner.png b/static/img/docs/twilio-banner.png new file mode 100644 index 0000000..2b5bd81 Binary files /dev/null and b/static/img/docs/twilio-banner.png differ diff --git a/static/img/docs/twilio-config.png b/static/img/docs/twilio-config.png new file mode 100644 index 0000000..dd0e0f6 Binary files /dev/null and b/static/img/docs/twilio-config.png differ diff --git a/static/img/docs/vonage-banner.png b/static/img/docs/vonage-banner.png new file mode 100644 index 0000000..4796245 Binary files /dev/null and b/static/img/docs/vonage-banner.png differ diff --git a/static/img/docs/vonage-config.png b/static/img/docs/vonage-config.png new file mode 100644 index 0000000..494a9b9 Binary files /dev/null and b/static/img/docs/vonage-config.png differ diff --git a/static/img/docs/webchat-banner.png b/static/img/docs/webchat-banner.png new file mode 100644 index 0000000..38ea4be Binary files /dev/null and b/static/img/docs/webchat-banner.png differ diff --git a/yarn.lock b/yarn.lock index 0437836..938c0be 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1193,7 +1193,7 @@ "@docsearch/css" "3.0.0-alpha.50" algoliasearch "^4.0.0" -"@docusaurus/core@2.0.0-beta.15", "@docusaurus/core@^2.0.0-beta.15": +"@docusaurus/core@2.0.0-beta.15": version "2.0.0-beta.15" resolved "https://registry.yarnpkg.com/@docusaurus/core/-/core-2.0.0-beta.15.tgz#1a3f8361803767072e56c77d60332c87e59f1ad0" integrity sha512-zXhhD0fApMSvq/9Pkm9DQxa//hGOXVCq9yMHiXOkI5D1tLec7PxtnaC5cLfGHljkN9cKIfRDYUVcG1gHymVfpA== @@ -3572,6 +3572,11 @@ dns-txt@^2.0.2: dependencies: buffer-indexof "^1.0.0" +docusaurus-gtm-plugin@^0.0.2: + version "0.0.2" + resolved "https://registry.yarnpkg.com/docusaurus-gtm-plugin/-/docusaurus-gtm-plugin-0.0.2.tgz#f39864b54ca594e3281902c23b6df0763761602b" + integrity sha512-Xx/df0Ppd5SultlzUj9qlQk2lX9mNVfTb41juyBUPZ1Nc/5dNx+uN0VuLyF4JEObkDRrUY1EFo9fEUDo8I6QOQ== + dom-converter@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768"