Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] panko-gpt

Featured Replies

Create AI bots (currently via ChatGPT) for various messaging platforms e.g. Discord, Telegram etc.

It abstracts the complexities of API connections, vector searching, etc. allowing you to focus on creating and designing the bots through a simple interface.

 

Docker Hub: https://hub.docker.com/repository/docker/catalinbertadev/panko-gpt/general

Discord: https://eq6w.short.gy/discord-invite

 

It uses mongodb atlas, so running the container requires to pass a mongodb url. 

While it works if you supply a local mongodb url (or some other community edition mongpdb url), I strongly recommend to use the cloud version mongodb atlas (you can use the free tier), because vector searching is only available in the cloud version and you can personalize the bots much better using vector searching. Sorry, this is a limitation from mongodb.

 

Once setup, in the WebUI you will be able to create bots by filling a form.

For Discord bots, you will need to have a bot key that you can get from the discord developer applications

For Telegram all you need to do it is message BotFather and you can create bots/keys on the fly.

 

A few known gotchas:

- to setup vector search, you need to create mongodb atlas api keys

- make sure you give the keys Owner permission (as it will create the index for you)

- make sure you whitelist your server ip (where panko-gpt is running) in Network Access (by default, it whitelists the IP the account gets created from)

- you need to make the discord bot join a server first, this app only handles the communication part

 

After a few user tests, I've realized that the setup can be cumbersome, so I will try to abstract all of this away in future versions

 

The code will be available open source on GitHub soon.

 

Happy to assist with any issues here or on Discord for more interactive support.

And any feedback is highly appreciated and helpful! Thanks

 

01-homepage.png

02-create-form.png

03-create-vector-search.png

04-settings.png

Edited by dracon
Clarifications

  • 3 months later...
  • Author

As promised, I have done some updates in order to improve user and developer experience.

- Code is available on GitHub https://github.com/catalinberta/panko-gpt

- The Unraid app panko-gpt will now ask all the required data from the beginning as env vars.  Currently it is asking for MongoDB Atlas but I am thinking to implement a local db in the near future.

Please note that if you have the old app already installed, you might not see the new required env vars and fail building @latest. To fix this, you have to go to Apps->Previous Apps and remove panko-gpt and install it again from the Apps page in order to see the new required fields.

If you wish to manually add the missing vars instead, these are the required ones:

 

docker run \
    --name=panko-gpt \
    -p 5002:5002 \
    -e MONGO_ATLAS_PUBLIC_KEY='atlas_public_key_here' \
    -e MONGO_ATLAS_PRIVATE_KEY='atlas_private_key_here' \
    -e MONGO_ATLAS_PROJECT_ID='atlas_project_id_here' \
    -e MONGO_ATLAS_CLUSTER_NAME='atlas_cluster_name_here' \
    -e MONGO_ATLAS_DB_NAME='pankogpt' \
    catalinbertadev/panko-gpt:latest

 

You can reply here if you have questions. You can also use Discord to get in touch with me or via GitHub issues.

 

  • 2 months later...

Hey @dracon! I'm not sure if I've done something wrong but I just can't get it to communicate with the database properly. Network access has been set, all the correct names/tokens. Just won't save any data and I'm getting this in the logs:

 

Init Atlas Configurator
API running on http://localhost:5002
MongooseError: Operation `discordconfigs.find()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `settings.findOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `settings.findOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `settings.findOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `settings.findOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `settings.findOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `discordconfigs.find()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `whatsappconfigs.find()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `settings.findOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)
MongooseError: Operation `settings.findOne()` buffering timed out after 10000ms
    at Timeout.<anonymous> (/usr/src/backend/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:185:23)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7)

 

Any ideas?

  • Author

Hi @deano_southafrican,

 

It's definitely a connection issue to MongoDB Atlas.

If the connection would be successful, you'd see a few more successful logging messages about it, here is an example of a successful output:

 

Quote

Init Atlas Configurator
API running on http://localhost:5002
Username found: pankogpt
Atlas Index: Using specified cluster: pankogpt
Connecting to MongoDB URL mongodb+srv://pank...
Using database: pankogpt
Server ready!
Atlas Index: Using index: pankogpt

 

There are a few gotchas when it comes to connecting to MongoDB Atlas:

- Network Access - I would say this is not yet an issue in your case, as network errors would appear later on in the logs. To be sure, you could just allow access from anywhere by going to Network Access -> Add IP Address -> Select `ALLOW ACCESS FROM ANYWHERE` Your issue however, is sooner than this step, which could be the next point:

- API Keys Access - Ensure you assigned `Organization Owner` access to your API Keys by going to `MongoDB Atlas Dashboard -> Settings -> Access Manager -> API Keys (tab) -> Edit Permissions` on your keys and select `Organization Owner` (this is because it needs to create a few things programatically).

But even for this lack of access, it should log out an error.

 

These are a few things I could think of from the top of my head.

This weekend I will try to reproduce your issue and also release a new version that will provide better logging to troubleshoot this MongoDB Atlas connection step in hopes that it will help in your case.

 

Meanwhile, if you try some more solutions and you have more feedback or logs that you can show me, please let me know, thanks!

Adding the Organisation Owner permission did the trick. Now it looks like it connects to Atlas but then it just crashes. I can access the front-end while the connection is happening but then the entire container crashes... Any ideas?

 

Unhandled Rejection at: Promise {
  <rejected> Error [ConnectionTimeoutError]: Connect timeout for 5000ms, GET https://cloud.mongodb.com/api/atlas/v1.0/groups/6532986a69795331fcdc584d/clusters/panko-gpt/fts/indexes/pankogpt/vectordatas? -2 (connected: false, keepalive socket: false, socketHandledRequests: 1, socketHandledResponses: 0)
  headers: {}
      at Timeout._onTimeout (/usr/src/backend/node_modules/urllib/lib/urllib.js:988:15)
      at listOnTimeout (node:internal/timers:573:17)
      at process.processTimers (node:internal/timers:514:7) {
    requestId: 9,
    data: undefined,
    path: '/api/atlas/v1.0/groups/6532986a69795331fcdc584d/clusters/panko-gpt/fts/indexes/pankogpt/vectordatas?',
    status: -2,
    headers: {},
    res: {
      status: -2,
      statusCode: -2,
      statusMessage: null,
      headers: {},
      size: 0,
      aborted: false,
      rt: 5004,
      keepAliveSocket: false,
      data: undefined,
      requestUrls: [Array],
      timing: null,
      remoteAddress: '',
      remotePort: '',
      socketHandledRequests: 1,
      socketHandledResponses: 0
    }
  }
} reason: Error [ConnectionTimeoutError]: Connect timeout for 5000ms, GET https://cloud.mongodb.com/api/atlas/v1.0/groups/6532986a69795331fcdc584d/clusters/panko-gpt/fts/indexes/pankogpt/vectordatas? -2 (connected: false, keepalive socket: false, socketHandledRequests: 1, socketHandledResponses: 0)
headers: {}
    at Timeout._onTimeout (/usr/src/backend/node_modules/urllib/lib/urllib.js:988:15)
    at listOnTimeout (node:internal/timers:573:17)
    at process.processTimers (node:internal/timers:514:7) {
  requestId: 9,
  data: undefined,
  path: '/api/atlas/v1.0/groups/6532986a69795331fcdc584d/clusters/panko-gpt/fts/indexes/pankogpt/vectordatas?',
  status: -2,
  headers: {},
  res: {
    status: -2,
    statusCode: -2,
    statusMessage: null,
    headers: {},
    size: 0,
    aborted: false,
    rt: 5004,
    keepAliveSocket: false,
    data: undefined,
    requestUrls: [
      'https://cloud.mongodb.com/api/atlas/v1.0/groups/6532986a69795331fcdc584d/clusters/panko-gpt/fts/indexes/pankogpt/vectordatas?'
    ],
    timing: null,
    remoteAddress: '',
    remotePort: '',
    socketHandledRequests: 1,
    socketHandledResponses: 0
  }
}
> tsc && vite build

vite v5.3.3 building for production...
transforming...
✓ 516 modules transformed.
rendering chunks...
computing gzip size...
dist/index.html                   0.45 kB │ gzip:   0.29 kB
dist/assets/logo-BBQ4Illo.png     8.74 kB
dist/assets/index-DpyhJGoW.css   31.88 kB │ gzip:   6.79 kB
dist/assets/index-CaIQrqW5.js   440.05 kB │ gzip: 131.40 kB
✓ built in 2.65s

> [email protected] build
> tsc

Init Atlas Configurator
API running on http://localhost:5002
Username found: pankogpt
Atlas Index: Using specified cluster: panko-gpt
Connecting to MongoDB URL mongodb+srv://pankogpt:[email protected]/?retryWrites=true&w=majority&appName=panko-gpt
Using database: pankogpt
Server ready!

** Press ANY KEY to close this window ** 

 

  • Author

@deano_southafrican

 

Thanks for getting back with an update. 👍

Good to see the logs, I will look into the issue this weekend 

  • Author

@deano_southafrican

 

Coming back to you with an update.

I was able to reproduce your latest issue and it looks to be a timeout error when fetching data from the MongoDB Atlas. I could only think that this might be due to trying to connect to a very far server from your current location? Make sure you're using the closest location as possible.

 

Either way, I've released a new version and you should now be able to update the docker container (or you can also directly click Force Update in case it did not yet detect the update). This new release adds a few extra checks when connecting to MongoDB and adds more logging for troubleshooting.

 

If you use Discord, I invite you to join the support server so that we can communicate easier on any other issues.

 

Let me know how it goes, thanks

  • Author

This issue has been resolved in v0.6.4

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.