mirror of
https://github.com/SillyTavern/SillyTavern-Extras.git
synced 2026-04-30 19:31:20 +00:00
Server: Add API key for security
When the extras server was hosted publicly, there was a huge security risk of anyone finding a cloudflare tunnel URL and directly querying API routes. However, this had a simple solution of implementing middleware to check if a generated API key is valid. Since the server is simple, the API key is a string of bytes stored in a textfile. If that textfile is deleted, extras will automatically create a new API key/textfile. Additionally, this is enabled via an optional argument to prevent local user irritation. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -134,6 +134,7 @@ cd SillyTavern-extras
|
||||
| `--port` | Specify the port on which the application is hosted. Default: **5100** |
|
||||
| `--listen` | Host the app on the local network |
|
||||
| `--share` | Share the app on CloudFlare tunnel |
|
||||
| `--secure` | Adds API key authentication requirements. Highly recommended when paired with share! |
|
||||
| `--cpu` | Run the models on the CPU instead of CUDA |
|
||||
| `--summarization-model` | Load a custom summarization model.<br>Expects a HuggingFace model ID.<br>Default: [Qiliang/bart-large-cnn-samsum-ChatGPT_v3](https://huggingface.co/Qiliang/bart-large-cnn-samsum-ChatGPT_v3) |
|
||||
| `--classification-model` | Load a custom sentiment classification model.<br>Expects a HuggingFace model ID.<br>Default (6 emotions): [nateraw/bert-base-uncased-emotion](https://huggingface.co/nateraw/bert-base-uncased-emotion)<br>Other solid option is (28 emotions): [joeddav/distilbert-base-uncased-go-emotions-student](https://huggingface.co/joeddav/distilbert-base-uncased-go-emotions-student)<br>For Chinese language: [touch20032003/xuyuan-trial-sentiment-bert-chinese](https://huggingface.co/touch20032003/xuyuan-trial-sentiment-bert-chinese) |
|
||||
|
||||
Reference in New Issue
Block a user