Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

supporting multiple bots and allow different role identities #54

Closed
mithew opened this issue Mar 13, 2023 · 1 comment
Closed

supporting multiple bots and allow different role identities #54

mithew opened this issue Mar 13, 2023 · 1 comment

Comments

@mithew
Copy link

mithew commented Mar 13, 2023

I suggest supporting multiple bots and allowing the setting of different role identities to facilitate multiple functions for different bots that need to be changed frequently.

@n3d1117
Copy link
Owner

n3d1117 commented Mar 14, 2023

Hey @mithew, I think what you're asking is a little out of the scope of this project. However, it can be achieved using docker-compose:

Assuming you have bot1.env defined:

OPENAI_API_KEY="XXX"
TELEGRAM_BOT_TOKEN="XXX"
ASSISTANT_PROMPT="Custom prompt for bot #1"

And bot2.env:

OPENAI_API_KEY="XXX"
TELEGRAM_BOT_TOKEN="XXX"
ASSISTANT_PROMPT="Custom prompt for bot #2"

Then you can define a custom docker-compose.yml along the lines of:

version: '3'
services:
  chatgpt-telegram-bot-1:
    build:
      context: ./bot1
      dockerfile: Dockerfile
    volumes:
      - ./bot1:/home/appuser/app
      - ./bot1.env:/home/appuser/app/.env
    restart: always

  chatgpt-telegram-bot-2:
    build:
      context: ./bot2
      dockerfile: Dockerfile
    volumes:
      - ./bot2:/home/appuser/app
      - ./bot2.env:/home/appuser/app/.env
    restart: always

And start the two bots with docker-compose up. Let me know if it helps!

@mithew mithew closed this as completed Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants