You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# This workflow will upload a Python Package using Twine when a release is created
2
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3
+
4
+
# This workflow uses actions that are not certified by GitHub.
5
+
# They are provided by a third-party and are governed by
6
+
# separate terms of service, privacy policy, and support
Providing chat like telegram bot interface for [abetlen/llama-cpp-python](https://github.com/abetlen/llama-cpp-python) or [huggingface/transformers](https://github.com/huggingface/transformers).
5
-
In addition, can an extension for [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui).
4
+
An extension for [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui).
5
+
6
+
In addition, can work as standalone app.
7
+
6
8
7
9
---------------
8
10
HOW TO INSTALL (**standalone app**):
@@ -17,22 +19,7 @@ HOW TO RUN (**standalone app**):
17
19
3) move your model file to `models/`
18
20
4) set **model_path** to your model in `configs/app_config.json`
19
21
5) start `run.cmd`(windows) or `run.sh`(linux)
20
-
---------------
21
-
HOW TO INSTALL (**extension mode**):
22
-
23
-
1) obviously, install [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui) first, add model, set all options you need
24
-
2) run `cmd_windows.bat` or `cmd_linux.sh` to enable venv
25
-
3) clone this repo to "text-generation-webui\extensions"
2) add your bot token in `text-generation-webui\extensions\telegram_bot\configs\telegram_token.txt` file or oobabooga environment
33
-
3) run server.py with `--extensions telegram_bot`
34
-
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`
35
-
---------------
22
+
6)---------------
36
23
37
24
FEATURES:
38
25
- chat and notebook modes
@@ -42,7 +29,7 @@ FEATURES:
42
29
- buttons: continue previous message, regenerate last message, remove last messages from history, reset history button, new char loading menu
43
30
- you can load new characters from text-generation-webui\characters with button
44
31
- you can load new model during conversation with button
45
-
-chatting "+" or "#" prefix for impersonate: "#Hero sister" or "+Castle guard". Or even ask bot generate your own message "+You"
32
+
- "+" or "#" user message prefix for impersonate: "#Chiharu sister" or "+Castle guard". Or even ask bot generate your own message "+You"
46
33
- "-" or "!" prefix to replace last bot message
47
34
- "++" prefix replace bot name during chat (switch conversation to another character)
48
35
- "--" prefix replace you name during chat
@@ -58,8 +45,8 @@ FEATURES:
58
45
59
46
CONFIGURATION:
60
47
61
-
`run_config.json` - config for running as standalone app (`run.sh` or `run.cmd`)
62
-
`extension_config` - config for running as extension for [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui)
48
+
`app_config.json` - config for running as standalone app (`run.sh` or `run.cmd`)
49
+
`ext_config.json` - config for running as extension for [oobabooga/text-generation-webui](https://github.com/oobabooga/text-generation-webui)
63
50
64
51
```
65
52
x_config.json
@@ -80,50 +67,59 @@ x_config.json
80
67
- generator_text_generator_webui_api - use oobabooga/text-generation-webui API extension
81
68
model_path=models\llama-13b.ggml.q4_0.bin
82
69
path to model .bin file
83
-
characters_dir_path=characters
84
-
default_char=Example.yaml
85
-
default cahracter and path to cahracters folder
86
-
presets_dir_path=presets
87
-
default_preset=Shortwave.yaml
88
-
default generation preset and path to preset folder
89
-
model_lang=en
90
-
user_lang=en
91
-
default model and user language. User language can be switched by users, individualy.
92
-
html_tag_open=<pre>
93
-
html_tag_close=</pre>
94
-
tags for bot answers in tg. By default - preformatted text (pre)
95
-
history_dir_path=history
96
-
directory for users history
97
-
token_file_path=configs\\telegram_token.txt
98
-
bot token. Ask https://t.me/BotFather
99
-
admins_file_path=configs\\telegram_admins.txt
100
-
users whos id's in admins_file switched to admin mode and can choose settings-for-all (generating settings and model)
101
-
users_file_path=configs\\telegram_users.txt
102
-
if just one id in users_file - bot will ignore all users except this id (id's). Even admin will be ignored
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.
70
+
characters_dir_path=characters
71
+
default_char=Example.yaml
72
+
default cahracter and path to cahracters folder
73
+
presets_dir_path=presets
74
+
default_preset=Shortwave.yaml
75
+
default generation preset and path to preset folder
76
+
model_lang=en
77
+
user_lang=en
78
+
default model and user language. User language can be switched by users, individualy.
79
+
html_tag_open=<pre>
80
+
html_tag_close=</pre>
81
+
tags for bot answers in tg. By default - preformatted text (pre)
82
+
history_dir_path=history
83
+
directory for users history
84
+
token_file_path=configs\\telegram_token.txt
85
+
bot token. Ask https://t.me/BotFather
86
+
admins_file_path=configs\\telegram_admins.txt
87
+
users whos id's in admins_file switched to admin mode and can choose settings-for-all (generating settings and model)
88
+
users_file_path=configs\\telegram_users.txt
89
+
if just one id in users_file - bot will ignore all users except this id (id's). Even admin will be ignored
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.
114
101
sd_api_url="http://127.0.0.1:7860"
115
-
stable diffusion api url, need to use "photo" prefixes
116
-
proxy_url
117
-
to avoid provider blocking
102
+
stable diffusion api url, need to use "photo" prefixes
103
+
proxy_url
104
+
to avoid provider blocking
105
+
118
106
107
+
telegram_generator_params.json
108
+
config for generator
109
+
110
+
telegram_sd_config.json
111
+
config for stable diffusion
119
112
120
113
telegram_admins.txt
121
-
list of users id who forced to admin mode.
114
+
list of users id who forced to admin mode. If telegram_users not empty - must be in telegram_users too!
122
115
123
116
telegram_users.txt
124
-
list og users id (or groups id) who permitted interact with bot. If empty - everyone permitted
117
+
list og users id (or groups id) who permitted interact with bot. If empty - everyone permitted
0 commit comments