Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/CodeGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function CodeGroup({ children }: { children: ReactNode }) {
const activeLineCount = activeInfo?.lineCount ?? 0

return (
<div className="code-group not-prose">
<div className="code-group not-prose" data-ready={tabs.length > 0 ? 'true' : undefined}>
{tabs.length > 0 && (
<div className="code-group-tabs" role="tablist">
{tabs.map((title, i) => (
Expand Down
5 changes: 4 additions & 1 deletion src/content/docs/adk/conversations/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,10 @@ export default new Conversation({

```ts title="Array of channels" highlight={2-5}
export default new Conversation({
channel: ['chat.channel', 'webchat.channel'],
channel: [
'chat.channel',
'webchat.channel'
],
handler: async ({ execute }) => {
await execute({
instructions: 'You are a helpful assistant.',
Expand Down
20 changes: 10 additions & 10 deletions src/content/docs/integrations/sdk/bots-as-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ yarn add -g @botpress/cli

You can check that your installation was successful by running the following command:

```bash title="bp --help"

```bash
bp --help
```

## 2. Log in to Botpress

Next, log in to your Botpress account using the Botpress CLI. You can do this by running the following command in your terminal:

```bash title="bp login"

```bash
bp login
```

{/* TODO: add a guide on how to create a personal access token and link to it. */}
Expand Down Expand Up @@ -113,8 +113,8 @@ export default new BotDefinition({}).addIntegration(chat, {

To refresh types available in your bot implementation, run the following command:

```bash title="bp gen"

```bash
bp gen
```

## 7. Implement a message handlers
Expand Down Expand Up @@ -161,8 +161,8 @@ This bot will respond to any message sent to it. It will echo back the text mess

Once you've made the necessary changes to your bot, you can deploy it to Botpress Cloud. Run the following command:

```bash title="bp deploy --create-new-bot"

```bash
bp deploy --create-new-bot
```

You'll be prompted for some information and confirmations. The `--create-new-bot` flag will create a new bot in your workspace. If you want to deploy to an existing bot, you can omit this flag. The CLI will prompt you for the bot in which you want to deploy.
Expand All @@ -173,8 +173,8 @@ After deploying, go to [the Dashboard](https://app.botpress.cloud). You should s

Now you can chat with your bot using the CLI. Run the following command:

```bash title="bp chat"

```bash
bp chat
```

This command will prompt you for the bot you want to chat with. Select the bot you just deployed, and start chatting with it. Press the escape key to exit the chat.
69 changes: 44 additions & 25 deletions src/content/docs/integrations/sdk/cli-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Login to Botpress Cloud.

**Usage:**

```bash title="bp login"
```bash
bp login
bp login --token your-token --workspace-id your-workspace-id
```

Expand All @@ -45,8 +46,8 @@ Logout of Botpress Cloud.

**Usage:**

```bash title="bp logout"

```bash
bp logout
```

---
Expand All @@ -57,7 +58,8 @@ Initialize a new project.

**Usage:**

```bash title="bp init"
```bash
bp init
bp init --type bot --name my-bot
bp init --type integration --template webhook-message
```
Expand All @@ -79,7 +81,8 @@ Generate typings for IntelliSense. Alias: `gen`

**Usage:**

```bash title="bp generate"
```bash
bp generate
bp gen --work-dir ./my-project
```

Expand All @@ -97,7 +100,8 @@ Generate typings and bundle a project.

**Usage:**

```bash title="bp build"
```bash
bp build
bp build --work-dir ./my-project --minify false
```

Expand All @@ -117,7 +121,8 @@ Bundle a Botpress project.

**Usage:**

```bash title="bp bundle"
```bash
bp bundle
bp bundle --work-dir ./my-project --source-map
```

Expand All @@ -137,7 +142,8 @@ Serve your project locally.

**Usage:**

```bash title="bp serve"
```bash
bp serve
bp serve --port 8080 --secrets SECRET1=value1 SECRET2=value2
```

Expand All @@ -157,7 +163,8 @@ Run your project in dev mode.

**Usage:**

```bash title="bp dev"
```bash
bp dev
bp dev --port 3000 --secrets API_KEY=secret123
```

Expand All @@ -183,7 +190,8 @@ Deploy your project to the cloud.

**Usage:**

```bash title="bp deploy"
```bash
bp deploy
bp deploy --bot-id my-bot-id --visibility public
bp deploy --create-new-bot --no-build
```
Expand Down Expand Up @@ -245,7 +253,8 @@ Read and parse an integration definition.

**Usage:**

```bash title="bp read"
```bash
bp read
bp read --work-dir ./my-integration
```

Expand All @@ -263,7 +272,8 @@ Lint an integration definition (experimental).

**Usage:**

```bash title="bp lint"
```bash
bp lint
bp lint --work-dir ./my-integration
```

Expand All @@ -281,7 +291,8 @@ Chat with a bot directly from CLI (experimental).

**Usage:**

```bash title="bp chat my-bot-id"
```bash
bp chat my-bot-id
bp chat my-bot-id --chat-api-url https://chat.example.com
```

Expand Down Expand Up @@ -312,7 +323,8 @@ Create a new bot. Alias: `new`

**Usage:**

```bash title="bp bots create --name my-bot"
```bash
bp bots create --name my-bot
bp bots new --name my-bot --if-not-exists
```

Expand All @@ -334,7 +346,8 @@ List bots. Alias: `ls`

**Usage:**

```bash title="bp bots list"
```bash
bp bots list
bp bots ls --dev
```

Expand All @@ -355,8 +368,8 @@ Get bot details.

**Usage:**

```bash title="bp bots get my-bot-id"

```bash
bp bots get my-bot-id
```

**Arguments:**
Expand All @@ -381,7 +394,8 @@ Delete a bot. Alias: `rm`

**Usage:**

```bash title="bp bots delete my-bot-id"
```bash
bp bots delete my-bot-id
bp bots rm my-bot-id
```

Expand Down Expand Up @@ -411,7 +425,8 @@ List integrations. Alias: `ls`

**Usage:**

```bash title="bp integrations list"
```bash
bp integrations list
bp integrations ls --name teams --dev
```

Expand Down Expand Up @@ -492,7 +507,8 @@ List interfaces. Alias: `ls`

**Usage:**

```bash title="bp interfaces list"
```bash
bp interfaces list
bp interfaces ls
```

Expand Down Expand Up @@ -570,7 +586,8 @@ List plugins. Alias: `ls`

**Usage:**

```bash title="bp plugins list"
```bash
bp plugins list
bp plugins ls --name knowledge
```

Expand Down Expand Up @@ -650,7 +667,8 @@ List all available profiles. Alias: `ls`

**Usage:**

```bash title="bp profiles list"
```bash
bp profiles list
bp profiles ls
```

Expand All @@ -662,8 +680,8 @@ Get the profile properties you are currently using.

**Usage:**

```bash title="bp profiles active"

```bash
bp profiles active
```

---
Expand All @@ -674,7 +692,8 @@ Set the current profile.

**Usage:**

```bash title="bp profiles use my-profile"
```bash
bp profiles use my-profile
bp profiles use production
```

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/integrations/sdk/installation.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ yarn add -g @botpress/cli

You can check that your installation was successful by running the following command:

```bash title="bp --help"

```bash
bp --help
```
2 changes: 1 addition & 1 deletion src/content/docs/integrations/sdk/integration/concepts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ Integrations can also provide multiple configuration schemas to support differen

For example, here's how the official [GitHub](https://botpress.com/integrations/github) integration [defines its configuration schemas](https://github.com/botpress/botpress/blob/840e7e65901d0234353ad6890b0ad49a734b4de5/integrations/github/src/definitions/index.ts#L28-L65):

```ts title="expandable"
```ts [expandable]
export const configurations = {
manualApp: {
title: 'Manual configuration',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,16 @@ yarn add -g @botpress/cli

You can check that your installation was successful by running the following command:

```bash title="bp --help"

```bash
bp --help
```

## 2. Log in to Botpress

Next, log in to your Botpress account using the Botpress CLI. You can do this by running the following command in your terminal:

```bash title="bp login"

```bash
bp login
```

{/* TODO: add a guide on how to create a personal access token and link to it. */}
Expand Down Expand Up @@ -122,8 +122,8 @@ Remove these error statements for now. You can come back later to implement your

Once you've made the necessary changes to your integration, you can deploy it to Botpress Cloud. Run the following command:

```bash title="bp deploy"

```bash
bp deploy
```

You'll be prompted for some information and confirmations. This integration will be deployed privately to your Workspace, and will only be visible and usable by members of your Workspace. As long as it remains private, you can update the same version by running the deploy command again. To deploy a new version, update the integration definition and run the deploy command once more.
Expand Down
3 changes: 2 additions & 1 deletion src/content/docs/integrations/sdk/integration/messaging.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ One of the most powerful features of Botpress Integrations is the ability to con

Here's a high-level overview of how messaging works in Botpress:

```mermaid title="sequenceDiagram"
```mermaid
sequenceDiagram
actor U as End User
participant ES as External Service
participant I as Integration
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/webchat/get-started/embedding-webchat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ You will need:
<Step title="Copy the script URL">
Open the URL in your browser and **copy the content of the page**. It should look something like this:

``` uri https://files.bpcontent.cloud/20XX/0X/0X/XX/XXXXXXXXXXXXXXXX-XXXXXXXX.js [expandable]
```js title="https://files.bpcontent.cloud/20XX/0X/0X/XX/XXXXXXXXXXXXXXXX-XXXXXXXX.js" [expandable]
window.botpress.init({
"botId": "xxxxxxxxxxxxxxxxxxxxxx",
"configuration": {
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/webchat/integrations/wix.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ You can also embed your bot in an HTML div. This is useful if you want more cont
<Step title="Copy the script URL">
Open the URL in your browser and **copy the content of the page**. It should look something like this:

``` uri https://files.bpcontent.cloud/20XX/0X/0X/XX/XXXXXXXXXXXXXXXX-XXXXXXXX.js [expandable]
```js title="https://files.bpcontent.cloud/20XX/0X/0X/XX/XXXXXXXXXXXXXXXX-XXXXXXXX.js" [expandable]
window.botpress.init({
"botId": "xxxxxxxxxxxxxxxxxxxxxx",
"configuration": {
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/webchat/interact/webchat-notification.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ First, add the bubble element somewhere in your website's HTML:

Then, add the following snippet to your website's JavaScript:

```js expandable
```js [expandable]
function openNotification() {
if (window.botpress) {
window.botpress.open()
Expand Down Expand Up @@ -579,7 +579,7 @@ This handles the behaviour of the notification bubble. For example:

Finally, add this CSS snippet to your website's stylesheet:

```css expandable
```css [expandable]
:root {
/* Change these to match your page's brand */
--bubble-bg: #ccddfa; /* background */
Expand Down
Loading
Loading