flynnoct / chatgpt-telegram-bot

Telegram bot implemented by OFFICIAL OpenAI ChatGPT API (gpt-3.5-turbo, released on 2023-03-01)
MIT License
181 stars 43 forks source link

Why do we need to copy a config.json file? #49

Closed peteisacat closed 1 year ago

peteisacat commented 1 year ago

Hello author, I have a question to ask. Why do we need to copy a config.json file through command during installation? Why not directly provide it in the program code? If it is provided directly, the user would have one less step during installation. I am not a programmer, just curious.Thank you for providing such an interesting project.😄

RayCxggg commented 1 year ago

Because the config.json file contains private information such as OpenAI API and Telegram tokens. We certainly don't want to expose our own keys. What's more, users may have different demands for the Bot, such as _adding more _allowed users__ or enable Dalle. The config.json file allows users to customize their own Bots complaint to their own needs.

We understand that many users are new to programming, so we try to build a comprehensive documentation which is easy to follow. Don't hesitate to try the Bot and bring up new issues when you encounter problems. Enjoy!

RayCxggg commented 1 year ago

I notice that issue #34 was opened by you. We are currently working on a script to help user update the config file through command line.

peteisacat commented 1 year ago

@RayCxggg Thank you for your hard work. Maybe I didn't describe the problem clearly in this question. What I mean is, why not directly provide an empty config.json file for users to fill in their own token and key, instead of manually generating config.json through the command (cp config.json.template config.json)。my english is not good ,sorry😄

peteisacat commented 1 year ago

I notice that issue #34 was opened by you. We are currently working on a script to help user update the config file through command line.

@RayCxggg cool, i got it。

flynnoct commented 1 year ago

Because if you messed up the config file during installation such as mis-deleting a key, you can just make a new copy from the template rather than downloading a new config file.

peteisacat commented 1 year ago

Because if you messed up the config file during installation such as mis-deleting a key, you can just make a new copy from the template rather than downloading a new config file.

Thank you for your answer, i see :)