Coder Social home page Coder Social logo

botpress / botpress Goto Github PK

View Code? Open in Web Editor NEW
12.0K 228.0 1.6K 273.62 MB

The open-source hub to build & deploy GPT/LLM Agents ⚡️

Home Page: https://botpress.com

License: MIT License

JavaScript 0.40% HTML 0.16% Shell 0.07% TypeScript 98.96% Starlark 0.42%
agent ai botpress chatbot chatgpt gpt gpt-4 llm openai langchain

botpress's Introduction

Botpress Cloud

Discord YouTube Subscribe Documentation @botpress/sdk @botpress/cli

Botpress is the ultimate platform for building next-generation chatbots and assistants powered by OpenAI. Start building incredible assistants for your projects or businesses at lightning speed.

Getting startedCloudDocumentationIntegrationsAgents

This Repository

This repository contains:

  • Integrations – all public integrations on the Botpress Hub maintained by Botpress
  • Devtools – all Botpress Cloud dev tools (CLI, SDK, API Client)
  • Bots - some example of bots "as code" made only using the SDK and the CLI
  • Agents – all public agents on the Botpress Studio (coming soon)

Contributing

We love contributions from the community!

We welcome pull requests and issues relevant for any code contained in this repository. See the This Repository section for more details.

For bugs or features related to the API, Botpress Dashboard or the Botpress Studio, please talk to us on Discord instead!

For any problem related to on-premise Botpress v12, please see the Botpress v12 repository.

Integrations

The /integrations folder contains all our public and open-source integrations. We invite the community to contribute their own integrations to Botpress Cloud.

Integration Development

To develop an integration, start by installing the Botpress CLI:

npm install -g @botpress/cli # for npm
yarn global add @botpress/cli # for yarn
pnpm install -g @botpress/cli # for pnpm

Then, in the directory of your choice, create a new integration:

bp init

This command will generate a integration from one of the proposed templates.

This step can be executed in any directory and git repository of your choice. You don't have to fork this repository to create an integration.

You can then modify both the definition and implementation of your integration respectively located in the integration.definition.ts and src/index.ts files.

For more information on how to develop an integration, please refer to the Documentation.

Once your integration is ready, you can deploy it to your workspace using the following command:

bp deploy

This will deploy your integration to your workspace and make it available to all your bots.

Making your Integration Public

By default, all integrations are private to the workspace they have been deployed in.

To submit your integration to the Botpress Hub and make it publicly available to the community, please make a pull request to this repository by following these Integration Contribution guidelines.

Bots

The /bots folder contains examples of bots "as code" made only using the client, the SDK and the CLI.

This is not the recommended way to build bots and is in no way a replacement for the Botpress Studio.

However it can be useful for experienced developers who want to build bots in a more programmatic way.

It is also used internally by the Botress team since the Studio and CLI both use the same underlying primitives.

Devtools

Package Description Docs Code
@botpress/cli Build and deploy private or public integrations Docs Code
@botpress/client Type-safe client to consume the Botpress APIs Docs Code
@botpress/sdk Internal package used by to build integrations Docs Code

Agents

Coming soon.

Local Development

Prerequisites

The development environment requires the following tools to be installed:

  • git: Git is a free and open source distributed version control system.
  • node: Node.js® is a JavaScript runtime built on Chrome's V8 JavaScript engine.
  • pnpm: PNPM is a fast, disk space efficient package manager.
  • tilt: Tilt is a toolkit for fixing the pains of microservice development.

Building from sources

# Clone the repository
git clone https://github.com/botpress/botpress.git
cd botpress

# Build Sources
tilt ci

# Run Checks
pnpm run check

Licensing

All packages in this repository are open-source software and licensed under the MIT License. By contributing in this repository, you agree to release your code under this license as well.

Let's build the future of chatbot development together! 🤖🚀

botpress's People

Contributors

abrahamlopez10 avatar allardy avatar bassamtantawi-botpress avatar botpressops avatar charlescatta avatar chsir17 avatar davidvitora avatar decayai avatar eff avatar franklevasseur avatar kimchicharlie avatar lakshya0246 avatar michaelmass avatar ptrckbp avatar robertoe91 avatar rohankokkulabp avatar slvnperron avatar spg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

botpress's Issues

Delete my botpress.cloud accounts

Hi,

I'm resorting to a GitHub issue as I can't find any actions in the UI, any contact email on the company website, or any related documentation in a google search.

I want to delete my Botpress Cloud accounts. How can this be done?

Want to pass custom username to the botpress from wordpress website . Custom username not showing by the botpress

"Need to have a Botpress for a wordpress sight that will recognize a user based on a cookie or session var. So when a user returns to a website it will greet them kike Joe glad to see you are back. But this is done inside the Botpress bot.

How can this be done ? I am trying to pass username to botpress but its not working
"
Below is the simple HTML code where user enter their name first time and after that i want that botpress can use that.But its not working?

<title>My Basic HTML Page</title> <script src="https://cdn.botpress.cloud/webchat/v1/inject.js?i=213132123123"></script> <script> function initializeChat(userName) { console.log("inside function:",userName) window.botpressWebChat.init({ userData: { name: userName, }, "composerPlaceholder": "Chat with bot", "botConversationDescription": "This chatbot was built surprisingly fast with Botpress", "botId": "915398e7-3cb8-43fe-8873-8e7a30a0c16f", "hostUrl": "https://cdn.botpress.cloud/webchat/v1", "messagingUrl": "https://messaging.botpress.cloud", "clientId": "", "webhookId": "", "lazySocket": true, "themeName": "prism", "frontendVersion": "v1", "useSessionStorage": true, "showPoweredBy": true, "theme": "prism", "themeColor": "#2563eb" }); }
function getUserNameAndInitializeChat() {
    let userName = localStorage.getItem('user_name');

    // Check if the username exists in localStorage
    if (!userName) {
        userName = prompt('Please enter your first name:');
        if (userName) {
            // Save the username to localStorage
            localStorage.setItem('user_name', userName);


            initializeChat(userName);
        }
    } else {

                            const myTimeout = setTimeout(initializeChat(userName), 2000);

                            console.log(userName);

        //initializeChat(userName);
    }
}

// Call the function to get the dynamic value for userName and initialize chat
getUserNameAndInitializeChat();
</script>

JavaScript heap out of memory when running pnpm run check

> botpress@ lint:check /home/thavarajan.m/projects/test/node-apps/botpress
> eslint ./ --ext .ts --ext .tsx


<--- Last few GCs --->

[334098:0x5d89d10]    30703 ms: Mark-Compact (reduce) 2047.8 (2084.4) -> 2046.3 (2082.1) MB, 418.76 / 0.00 ms  (+ 97.8 ms in 28 steps since start of marking, biggest step 5.4 ms, walltime since start of marking 532 ms) (average mu = 0.304, current mu = 0.[334098:0x5d89d10]    31341 ms: Mark-Compact (reduce) 2047.5 (2082.1) -> 2046.3 (2082.1) MB, 458.45 / 0.00 ms  (+ 38.5 ms in 15 steps since start of marking, biggest step 5.6 ms, walltime since start of marking 510 ms) (average mu = 0.265, current mu = 0.

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xc9e850 node::Abort() [node]
 2: 0xb720ff  [node]
 3: 0xec1a70 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 4: 0xec1d57 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, v8::OOMDetails const&) [node]
 5: 0x10d3dc5  [node]
 6: 0x10d4354 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0x10eb244 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) [node]
 8: 0x10eba5c v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0x10c1d61 v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0x10c2ef5 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
11: 0x10a0466 v8::internal::Factory::NewFillerObject(int, v8::internal::AllocationAlignment, v8::internal::AllocationType, v8::internal::AllocationOrigin) [node]
12: 0x14fb386 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
13: 0x7f632e699ef6 
Aborted (core dumped)

got this error when i try to run pnpm run check, just follow the instruction from the index page, am i missing anything

i used nvm to maintain node multiple versions, was it a reason?

My system configuration:
image

Unhandled Promise Rejection trying to call the action whatsapp:startConversation

Make sure the issue is related to code located in this repository.

  • I confirm that the reported bug or feature request is not related to Botpress on premise version (v12 and below)
  • I confirm that the reported bug or feature request is not related to the Botpress Studio
  • I confirm that the reported bug or feature request is not related to the Botpress Dashboard

Description of the bug or feature request

I implementing the call exactly as the docs say, but still I am getting Unhandled Promise Rejection. Might be because the Whatsapp API needs to be updated in the integration ? (using the exact same parameters works in the Studio)

const result = await client.callAction({
type: 'whatsapp:startConversation',
input: {
userPhone,
templateName,
},
})

Unhandled Promise Rejection {"errorType":"Runtime.UnhandledPromiseRejection","errorMessage":"Error: timeout of 60000ms exceeded","reason":{"id":"err_20240415172010xD553C39B","code":500,"type":"Unknown","message":"timeout of 60000ms exceeded"},"promise":{},"stack":["Runtime.UnhandledPromiseRejection: Error: timeout of 60000ms exceeded"," at process.<anonymous> (file:///var/runtime/index.mjs:1276:17)"," at process.emit (node:events:517:28)"," at emit (node:internal/process/promises:149:20)"," at processPromiseRejections (node:internal/process/promises:283:27)"," at processTicksAndRejections (node:internal/process/task_queues:96:32)"," at runNextTicks (node:internal/process/task_queues:64:3)"," at listOnTimeout (node:internal/timers:538:9)"," at process.processTimers (node:internal/timers:512:7)"]}

Can no longer deploy integration after adding hub.md file

Screenshot 2024-02-28 085056

Problem: After adding hub.md file, I can no longer deploy my integration to the studio. Problem does not happen after removing the file. Full repo at: Link

● Error:
An unexpected error occurred when trying to process your request. (Error ID: err_20240228134956x68C11008)
 ELIFECYCLE  Command failed with exit code 1.
PS C:\Users\camer\OneDrive\Desktop\Simply Great Bots\Integrations\Wikipedia Integration\wiki>

Bot stops responding after more than 60 seconds of execute code processing

Hi Botpress team! I have an issue I've been struggling with for some time and definitely you could shed some light.

My bot needs to API-call an external system which works in a queue based pattern:

I send a request to it and it returns me a job id
Aftwerwards, I can either poll for the job completion status through one (or many) follow-up call or wait for a callback to move on

Considerations:

  • These jobs usually take 3 to 5 minutes to complete
  • I am using the WhatsApp integration as the main delivery channel to users

Polling the service in an execute code card led me to a timeout after 60 seconds and the bot stopped responding.

I replicated this question in the Office Hours session earlier today, and Patrick suggested me to try creating several Execute Card statements to do the polling every 40 seconds or so. I implemented it and was not successful - after 60 seconds (second polling interval), the bot just stops responding and does not get back to the user and do not throw an error. I had to reset the state to get the conversation back to a working state.

The workflow implementation, Execute Code card and the user response are attached.

Workflow:
image

Execute Code:

// Auxiliary functions and constants
const POLLING_INTERVAL_MS = 40000
const TIMEOUT_INTERVAL_SECONDS = 180
const wait = (ms = 1000) => {
  return new Promise((resolve) => {
    setTimeout(resolve, ms)
  })
}

// Initialize query params
const query = `
  query IngestAdhocContentStandalonePublication($id: uuid!) {
    ingestAdhocContentStandalonePublication(id: $id) {
      // --- redacted ---
    }
  }`
const variables = { id: workflow.ingestionId }
const config = {
  headers: {
    'Content-Type': 'application/json',
    'x-api-key': env.backend_gql_api_key
  }
}

if (workflow.ingestionStatus !== 'success' && workflow.ingestionStatus !== 'failed') {
  // Poll ingestion processing job
  const { data } = await axios.post(env.backend_gql_api_endpoint, { query, variables }, config)
  if (data.data?.errors?.length > 0 || data.data?.ingestAdhocContentStandalonePublication?.output?.postId) {
    if (data.data.errors?.length > 0) {
      // Flag failed ingestion
      workflow.ingestionStatus = 'failed'
    } else {
      // Store results in workflow variables
      const { postId, title, publisher, description } = data.data.ingestAdhocContentStandalonePublication.output
      workflow.postId = postId
      workflow.title = title
      workflow.publisher = publisher
      workflow.description = description
      workflow.ingestionStatus = 'success'
    }
  } else {
    await wait(POLLING_INTERVAL_MS)
  }
}

User response:
image

error parsing template SyntaxError: Unexpected token '}'

When trying to use a webchat with custom configuration, the workflow always fails after the first node with

error parsing template SyntaxError: Unexpected token '}'

It doesn't seem to matter what the content of my workflow is. Ironically, I can see that userData was received in the logs. I mentioned it to a chat support agent and he believes it's an error on Botpress' side.

Feature Request - Matrix Support

Happy to work on this, we can use this issue to coordinate:

What? Matrix support for Botpress including:

  • multiple servers
  • spaces
  • rooms
  • threads
  • bridges

Why? Matrix is an open source e2ee, federated, communication tool. With spaces you get a distributed tree data store

How? Much the same way as the Telegram plugin. Further discussion below.

This could also give us access to matrix bridges enabling support for many more services beyond Matrix.

Knowledge base agent doesn't respond when using webhook trigger

Here is the Workflow

  • I send a webhook request and in that body a query
  • Upon Webhook Trigger, Knowledge base is queried and answer is saved to a variable
  • An exectue code block runs and sends the given answer to my server by posting it at my server's api

Now the whole workflow executes but only that upon querying knowledge base I get no answer and turn.knowledgebase.responded is false always.

I have used the same flow but instead of connecting it to a webhook trigger I connect it to a start node and it works, but If I connect it with webhook trigger event it doesn't work.

This is how I have connected the nodes

image

Query Knowledge base Config

image

The Code Block

image

Error with Botpress repository

Make sure the issue is related to code located in this repository.

  • I confirm that the reported bug or feature request is not related to Botpress on premise version (v12 and below)
  • I confirm that the reported bug or feature request is not related to the Botpress Studio
  • I confirm that the reported bug or feature request is not related to the Botpress Dashboard

Description of the bug or feature request

Good morning,
I'm trying to run Botpress on my VPS server together with Typebot, I'm using Docker with Portainer and Traefik to run the application, before creating the stack for the project, I created a network for Botpress and added Traefik to that network, but when I have to deploy the stack and it tells me an error code (attached to the message)
I'm using a Linux system with Ubuntu 22.04, Docker 25.0.4 and Docker Compose v2.24.7, I installed Portainer and Traefik via SSH terminal.
I tried to install Botpress within WSL on my computer and the same problem ended up occurring, I would like to know if someone could help me resolve this.
Thank you in advance for any help you give me, the code i am using and the error message are attached bellow.

Screenshot 2024-03-19 140916

`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
labels:
- "traefik.enable=true"
- "traefik.http.routers.botpress.rule=Host(botpress.meusite.com) || Host(www.botpress.meusite.com)" #troque pelo seu dominio
- "traefik.http.routers.botpress.entrypoints=websecure"
- "traefik.http.routers.botpress.tls=true"
- "traefik.http.routers.botpress.tls.certresolver=leresolver"

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:
botpress_data:
pgdata:
redisdata:

networks:
default:
name: botpress
external: true`

request/body must have required property 'conversationId' - Webhook integration

I am trying to send a message after a webhook event and I get this error message after the event is triggered and tries to send a message back:

Error sending outgoing message {
  integration: 'webhook',
  messageType: 'text',
  payload: '{"type":"text","text":"Send this text after webhook","typing":true}',
  error: yt [Error]: request/body must have required property 'conversationId' (Error ID: err_1692749696997xB539FD1C)
      at Mr (/var/task/customer_code.js:8:27984)
      at Ot (/var/task/customer_code.js:8:27764)
      at w (/var/task/customer_code.js:8:67151)
      at /var/task/customer_code.js:8:62051
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async Object.flushSendMessages (/var/task/customer_code.js:294:5069)
      at async runDialogEngine (/var/task/customer_code.js:315:3624)
      at async startEventProcessing (/var/task/customer_code.js:315:3220)
      at async Object.onEvent (/var/task/customer_code.js:315:8254)
      at async handler (/var/task/customer_code.js:429:2262) {
    isApiError: true,
    code: 400,
    description: 'The request payload is invalid.',
    type: 'InvalidPayload',
    error: undefined
  }
}
image

Steps to reproduce:

  1. Activate webhook integration
  2. Create a node that send a message after a webhook event is triggered.
image
  1. Use a http client to send a web hook event as documentation recomends: https://botpress.com/docs/cloud/channels/webhook/ (Note when using secret-token, the documentation suggests x-botpress-secret but in the source code seems to be "x-bp-secret" as you can check here )
image

I tried with documentation body changing the user id and it neither worked.

{
  "type": "text",
  "text": "Hello Webhooks!",
  "user": {
    "id": "user-id",
    "name": "User Name"
  },
}

Which is the correct way to send the user and conversation id?

Cant create a Bot

So basically i cant create a bot. Every time i try to it says an error occured, try again. Dunno what to do didnt find anything in the net about it. I tried different network and different notebook, different account just to be sure none of them worked either.
Botpress error

arm64 images for docker

It would be good if Botpress ran on arm64 machines as there are many possibilities for implementation and development on these machines currently. I already have several apps running on these machines, now it's botpress's turn

Advanced WhatsApp Support

Hi there, I'm considering botpress, looks really cool
But I haven't found any documentation on
How to use advanced WhatsApp features

For example I would like the bot to be able to process emoji message reactions, aswell as send emoji reactions. Also to send custom/dynamic buttons in WhatsApp chats. Open groups with users and change group permissions. And other advanced WhatsApp features

Are these available? I'm used to working with open-wa
Thanks and all the best

Error while handling request for hello world chatbot application

Hey team - I am new to botpress and I am currently exploring building apps using botpress sdk. I followed through the instructions in the documentation created this sample hello world app.

import { Bot } from '@botpress/sdk'

const bot = new Bot({})

bot.message(async ({ message, client, ctx }) => {
  console.info('Received message', message)

  await client.createMessage({
    conversationId: message.conversationId,
    userId: ctx.botId,
    tags: {},
    type: 'text',
    payload: {
      text: 'Hello world!',
    },
  })

  console.info('text message sent')
})

export default bot

However, when i run bp dev and open localhost:8075 I am getting below error on my console.

Error while handling request {
  error: '[\n' +
    '  {\n' +
    `    "expected": "'event_received' | 'register' | 'unregister' | 'ping'",\n` +
    '    "received": "undefined",\n' +
    '    "code": "invalid_type",\n' +
    '    "path": [],\n' +
    '    "message": "Required"\n' +
    '  }\n' +
    ']'
}

I was hoping to see a chatbot like UI with a message hello world. am I missing something ? I have already spent hours looking through documentation and examples but I could not see anything that could help. any resources around this or suggestions could help me resolve this.

thank you

Telegram Channel Crashing Bot (getUpdates make sure only one bot instance is running)

Peace fam,

I keep coming across this error on different projects running the latest version of BP (current 12.30.9
). This error forces the bot to restart and after a few restarts it stops. I know I do not have more than one instance of the bot running. I have recreated this error on multiple bots:

  1. Install and configure Botpress v12.30.9 on docker
  2. Add Telegram configuration to bot/config.js under Messaging -> Channels -> Telegram
  3. Start conversation with ChatBot, or leave bot running for ~ 15 minutes
252896594-819d256d-419a-492d-a91d-6b0b69f1a837

PS. I have also reported this in Botpress/Messaging but no response: botpress/messaging#609 (comment)

List of conversations API does not show complete conversations

Hello, I have been testing the conversation API, but I have noticed that the API does not retrieve the full conversations and it just includes webchat integration despite having other integrations like telegram. I am sure I have messages and conversations on August but the APIs just show me September ones and it does not allow pagination

*Screenshot
image

This is my API results and meta does not show nextToken.

{
    "conversations": [
        {
            "id": "712af378-8621-4948-885e-51660424c04a",
            "createdAt": "2023-09-14T19:39:26.764Z",
            "updatedAt": "2023-09-14T19:39:26.764Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "51f433df-52c8-4595-9e64-7a44bef1b5be"
            }
        },
        {
            "id": "3d365687-cbce-44a3-9592-5e48f0175e6f",
            "createdAt": "2023-09-08T22:04:22.640Z",
            "updatedAt": "2023-09-08T22:04:22.640Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "f7b20ffd-16e4-4eec-bce9-77fdb0428b5d"
            }
        },
        {
            "id": "ce44ae00-b1f2-4b2b-ba17-be9dea0d53dd",
            "createdAt": "2023-09-08T15:46:31.001Z",
            "updatedAt": "2023-09-08T15:46:31.001Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "32e5bc58-4f47-4677-9b8e-ca7d11fade6a"
            }
        },
        {
            "id": "913cbceb-c7db-4658-9c76-945643101693",
            "createdAt": "2023-09-08T15:39:17.668Z",
            "updatedAt": "2023-09-08T15:39:17.668Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "2d82f63c-c639-4d7b-8e13-ddcb31369f68"
            }
        },
        {
            "id": "423a6223-a55d-4ab9-9843-1ac304f6982b",
            "createdAt": "2023-09-08T15:04:27.760Z",
            "updatedAt": "2023-09-08T15:04:27.760Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "a185437b-4bed-4058-88d4-594fe6579572"
            }
        },
        {
            "id": "ff384141-8f40-4e08-8e9b-a13ba7010e0f",
            "createdAt": "2023-09-08T15:00:33.598Z",
            "updatedAt": "2023-09-08T15:00:33.598Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "0a361b06-1285-496b-afde-78e4c4a8830e"
            }
        },
        {
            "id": "8ad2fdf7-fe68-4231-8d2a-83131c8fba0d",
            "createdAt": "2023-09-08T14:54:22.090Z",
            "updatedAt": "2023-09-08T14:54:22.090Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "d30408cf-8565-4000-89bd-6443e3de1aff"
            }
        },
        {
            "id": "9251cc98-0ab3-4636-bb41-9d4c6b7fe3b0",
            "createdAt": "2023-09-08T14:50:44.023Z",
            "updatedAt": "2023-09-08T14:50:44.023Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "6d2094d2-6795-406c-ac78-f3a4bd68b539"
            }
        },
        {
            "id": "1dfd56a5-6e9f-4ef9-a081-7915f0592b93",
            "createdAt": "2023-09-08T14:08:16.638Z",
            "updatedAt": "2023-09-08T14:08:16.638Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "5c6a0257-0906-4337-ae5c-82e71cd403aa"
            }
        },
        {
            "id": "fa2e8687-9cd5-47ce-9b9c-625adebb7f55",
            "createdAt": "2023-09-08T00:52:35.547Z",
            "updatedAt": "2023-09-08T00:52:35.547Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "2a2948db-c705-4314-9237-685dec9fda54"
            }
        },
        {
            "id": "48d335cc-d242-4849-8620-ed1b64304cdb",
            "createdAt": "2023-09-08T00:14:04.875Z",
            "updatedAt": "2023-09-08T00:14:04.875Z",
            "channel": "channel",
            "integration": "webchat",
            "tags": {
                "webchat:id": "58bbfded-241f-402d-b3b8-a85b6cef342f"
            }
        }
    ],
    "meta": {}
}
image

I have another question. Is there any way to filter the conversation list by dates?

Uploading a video or embedding a video url

Hi,

at first, I was trying to put a video url in order to embed it in one of the nodes, so that a user can play that video, but I didn't find such option.
then, I was trying to upload a Youtube video, because that option is available, but I keep getting a "network error" when uploading a video.
please help.
Shahar

BP Dev randomly crashes

Error message
image

bp dev randomly crashes after a few minutes. I don't see any pattern behind other than it doesn't crash immediately, and not after a long time. Ballpark guess is 20-30 minutes. Seems like a tunnel timing out.

I'm on MacOs 11.6.8
Node 18.13.0
pnpm 8.6.5

Let me know if there are ways to share verbose info!

Path to reproduce :

cd path/to/botpress/botpress
nvm install
nvm use
npm i -g pnpm
pnpm i
bp build
cd path/to/bot/or/integration/
bp dev

wait 30 minutes ish.

Integrate knowledge base into the bot using the API

Is it possible to make use of knowledge bases when I'm creating the bot using the API not The Cloud Studio? using the studio it's easy to add knowledge bases and it was working fine, but I didn't have this ability in the docs for the "for developers" docs and the "API reference" docs

Is pnpm required?

Is pnpm required to add integrations? It doesn't seem to have a high market share.

Documentation - Docs Should Follow its Own Advice to Implement All Message Types

Make sure the issue is related to code located in this repository.

  • I confirm that the reported bug or feature request is not related to Botpress on premise version (v12 and below)
  • I confirm that the reported bug or feature request is not related to the Botpress Studio
  • I confirm that the reported bug or feature request is not related to the Botpress Dashboard

Description of the bug or feature request

The SDK documentation states:

For now, we will only implement the text message. The defaults object that comes from the SDK is used to define the default messages that the integration supports. We highly recommend implementing all message types provided by the SDK.

If it's highly recommended to implement all message types provided by the SDK, perhaps the docs should implement all types provided by the SDK? Otherwise, it's unclear how to follow this very important recommendation. Also, using Telegram group chat as the only example seems like an unusual choice that won't apply to most users.

So I guess it would be something like


      messages: {
        audio: messages.defaults.audio,
        card: messages.defaults.card,
        carousel: messages.defaults.carousel,
        choice: messages.defaults.choice,
        dropdown: messages.defaults.dropdown,
        file: messages.defaults.file,
        image: messages.defaults.image,
        location: messages.defaults.location,
        markdown: messages.defaults.markdown,
        text: messages.defaults.text,
        video: messages.defaults.video
      }

Get User Data not working

Hi,
I'm using reactjs with botpress and I'm trying to send userData to the bot.

As you can see in this image my user variable is not found and also if I create a new one it creates a workflow variable, but also using the workflow variable it is not able to retrieve the frontend user data sent:
image

In this second image you can see that I initialized the data variable but the studio as still the label "not set":
image

This is my reactjs code and you can see I added the userData:
image

Testing the bot from my react application I always get undefined, so this means that is unable to read the react userData values.

Am I doing something wrong or there're issues by your side?

Regards,
Jonathan

Markdown

What are the odds of support for markdown in the knowledgebase feature? All of our documentation is in markdown. Is this a feature that the team needs work done on? I'd be happy to make a fork if it's of interest to anyone.

request/body must have required property 'userId' - Webhook Trouble

Make sure the issue is related to code located in this repository.

  • I confirm that the reported bug or feature request is not related to Botpress on premise version (v12 and below)
  • I confirm that the reported bug or feature request is not related to the Botpress Studio
  • I confirm that the reported bug or feature request is not related to the Botpress Dashboard

Description of the bug or feature request

Hello,

I've been looking to send an Http request to Botpress using N8N (Make/Zapier alternative) and keep running into this issue (
Error Message

It seems the userId is not being captured, despite the fact that it has been included in the payload and goes through within the Botpress emulator:
Payload body in Botpress Emulator

This was happening with "conversation Id", however it has since stopped and now only appears to being doing so for userId.

Am I doing something wrong, or do I have the payload structured incorrectly? Here is the payload structure within N8N if it helps:
HTTP Headers
HTTP Body
HTTP Body (2)

Here is my workflow as well if it is helpful, as well as the execute code node that's used after the webhook trigger:
Execute Codeblock
Botpress Workflow

Any help is appreciated!

Thanks.

Botpress - open source

Hi,
I tried to use botpress as local bot solution deployed locally or on my private hosts.
Once I did bp init and login it requested access token and deployment gone to the SaaS solution.
Can you instruct how to use it locally independently from the botpress SaaS solution?

Thanks
Moshe

Adding extra intercom webhook topics causes infinite loops

Not sure which topics cause the issue, (I selected them all).

Since we are not checking the topic, other webhooks are triggering the bot to respond to itself causing endless conversations.

The workaround is to only add the two required topics. The solution is to whitelist the topics in the integration code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.