yym68686 / ChatGPT-Telegram-Bot

TeleChat: 🤖️ an AI chat Telegram bot can Web Search Powered by GPT-3.5/4/4 Turbo/4o, DALL·E 3, Groq, Gemini 1.5 Pro/Flash and the official Claude2.1/3/3.5 API using Python on Zeabur, fly.io and Replit.
https://t.me/chatgpt68_bot
GNU General Public License v3.0
778 stars 226 forks source link

Enchancement - Add Group Folder/Button to models in bot #63

Open ratu-sh opened 1 week ago

ratu-sh commented 1 week ago

Problem - When you use in bot many different providers with many different models - it is very hard to find needed one without sorting and filtering from one shared big list of models.

Enchancement - i think it could be good idea to add ability to group models in bot by your choice with environment variables. So when you click on "/info - change model" - you will see not one shared list of all models - but several buttons with group names. and when you click button - than you see list of models only from that group.

for example you may group models by provider name (openrouter, grok, google, others), or by models family (gemini, llama, chatgpt, others) or by any another way.

for it purpose you can add some variables in environment like:

Environment="GET_MODELS=False"
#Environment="CUSTOM_MODELS=-all,***,***"
Environment="GROUP_MODELS=True"
Environment="GROUP_NAMES="gemini,llama,chatgpt,others"
Environment="GROUP_1=model-1-example,model-2-example"
Environment="GROUP_x=***"
Environment="GROUP_4=model-3-example,model-4-example"
yym68686 commented 1 week ago

Hello, I don't think adding too many environment variables is a good idea. I cannot accept adding so many environment variables just to meet this one requirement. I hope there is a better way.

ratu-sh commented 1 week ago

Hello, I don't think adding too many environment variables is a good idea. I cannot accept adding so many environment variables just to meet this one requirement. I hope there is a better way.

than we can add in Environment only 1 variable with groups.yaml (or json or txt) path like that

Environment="GROUP_MODELS_PATH=\path\to\groups.yaml"

and groups.yaml will have this structure:

  - group: group-1
    button_name: openai
    models:
      - gpt-3.5-turbo
      - gtp-4o-mini
      - ***

  - group: group-2
    button_name: meta
    models:
      - llama-3.1-7b
      - llama-3.2-80b
      - ***

- group: group-3
    button_name: gemini
    models:
      - gemini-1.5-flash
      - gemini-1.5-pro
      - ***
ratu-sh commented 1 week ago

also, I think it might be a good idea to also move such variables from Environments to separate configuration files :

maybe you could even move all variables from Environments to separate configuration files, but i don't know if it also good idea

yym68686 commented 1 week ago

I need to carefully consider this feature and think of a more elegant way. Your customization requirements are too high and don't quite align with the out-of-the-box concept of this project. I need to find a balance. Once it's done, I will notify you here.I need to carefully consider this feature and think of a more elegant way. Your customization requirements are too high and don't quite align with the out-of-the-box concept of this project. I need to find a balance. Once it's done, I will notify you here.

ratu-sh commented 1 week ago

by default this variable and this config.yaml can be ommited and ignored - so it doesn't ruine out-of-the-box concept. but only if somebody wish to implement groups/buttons logic - than it is supported by adding 1 variable and 1 config.yaml.