Skip to content

Commit

Permalink
extension_mode_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
innightwolfsleep committed Sep 14, 2023
1 parent a28fbe9 commit a406335
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,21 @@ HOW TO RUN (**standalone app**):
1) get bot token from https://t.me/BotFather
2) add bot token to environment (look `.env.example`) OR file `configs/telegram_token.txt`
3) move your model file to `models/`
4) set **model_path** to your model in `configs/telegram_config.json`
5) start `run.cmd` or `run.sh` or `python3 run.py`
4) set **model_path** to your model in `configs/app_config.json`
5) start `run.cmd`(windows) or `run.sh`(linux)
---------------
HOW TO INSTALL (**extension mode**):

1) obviously, install [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui) first
2) run `cmd_windows.bat` or `cmd_linux.sh`
1) obviously, install [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui) first, add model, set all options you need
2) run `cmd_windows.bat` or `cmd_linux.sh` to enable venv
3) clone this repo to "text-generation-webui\extensions"
`git clone https://github.com/innightwolfsleep/text-generation-webui-telegram_bot text-generation-webui\extensions\telegram_bot`
2) install requirements
`pip install -r text-generation-webui\extensions\telegram_bot\requirements_ext.txt`
4) install requirements
`pip install -r text-generation-webui\extensions\telegram_bot\ext_requirements_ext.txt`

HOW TO USE (**extension mode**):
1) add your bot token in `text-generation-webui\extensions\telegram_bot\configs\telegram_token.txt` file. (ask https://t.me/BotFather how to get token)
1) get bot token from https://t.me/BotFather
2) add your bot token in `text-generation-webui\extensions\telegram_bot\configs\telegram_token.txt` file or oobabooga environment
3) run server.py with `--extensions telegram_bot`
4) (optional) if you are facing internet issue, change `proxy_url` at `extension_config.json` into your own proxy. For example: `https://127.0.0.1:10808`
---------------
Expand Down Expand Up @@ -110,6 +111,11 @@ x_config.json
generating settings
translation_as_hidden_text=on
if "on" and model/user lang not the same - translation will be writed under spoiler. If "off" - translation without spoiler, no original text in message.
sd_api_url="http://127.0.0.1:7860"
stable diffusion api url, need to use "photo" prefixes
proxy_url
to avoid provider blocking
telegram_admins.txt
list of users id who forced to admin mode.
Expand Down

0 comments on commit a406335

Please sign in to comment.