Skip to content

Commit

Permalink
added proxy as optional configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
n3d1117 committed Dec 8, 2022
1 parent 52d9fd0 commit da78132
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ TELEGRAM_BOT_TOKEN="<YOUR_TELEGRAM_BOT_TOKEN>"
Additional optional (but recommended) configuration values:
```bash
ALLOWED_TELEGRAM_USER_IDS="<USER_ID_1>,<USER_ID_2>,..." # Defaults to "*"
DEBUG=false # Defaults to TRUE, set to FALSE to disable debug mode
PROXY="<HTTP/HTTPS_PROXY>" # E.g. "http://localhost:8080", defaults to none
DEBUG=false # Defaults to true
```
* `ALLOWED_TELEGRAM_USER_IDS`: A comma-separated list of Telegram user IDs that are allowed to interact with the bot (use [getidsbot](https://t.me/getidsbot) to find your user ID). **Important**: by default, *everyone* is allowed (`*`)
* `PROXY`: Proxy to be used when authenticating with OpenAI
* `DEBUG`: Enable debug logging for the [revChatGpt](https://github.com/acheong08/ChatGPT) package

### Run
Expand Down
1 change: 1 addition & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ def main():
chatgpt_config = {
'email': os.environ['OPENAI_EMAIL'],
'password': os.environ['OPENAI_PASSWORD'],
'proxy': os.environ.get('PROXY', ''),
}
telegram_config = {
'token': os.environ['TELEGRAM_BOT_TOKEN'],
Expand Down

0 comments on commit da78132

Please sign in to comment.