Per-user token quotas and automatic quota refreshing (khanon/oai-reverse-proxy!37)
This commit is contained in:
@@ -12,12 +12,12 @@ This repository can be deployed to a [Huggingface Space](https://huggingface.co/
|
||||
- Provide a name for your Space and select "Docker" as the SDK. Select "Blank" for the template.
|
||||
- Click "Create Space" and wait for the Space to be created.
|
||||
|
||||

|
||||

|
||||
|
||||
### 3. Create an empty Dockerfile
|
||||
- Once your Space is created, you'll see an option to "Create the Dockerfile in your browser". Click that link.
|
||||
|
||||

|
||||

|
||||
- Paste the following into the text editor and click "Save".
|
||||
```dockerfile
|
||||
FROM node:18-bullseye-slim
|
||||
@@ -34,7 +34,7 @@ CMD [ "npm", "start" ]
|
||||
```
|
||||
- Click "Commit new file to `main`" to save the Dockerfile.
|
||||
|
||||

|
||||

|
||||
|
||||
### 4. Set your API key as a secret
|
||||
- Click the Settings button in the top right corner of your repository.
|
||||
@@ -82,8 +82,6 @@ MAX_OUTPUT_TOKENS_ANTHROPIC=512
|
||||
# Block prompts containing disallowed characters
|
||||
REJECT_DISALLOWED=false
|
||||
REJECT_MESSAGE="This content violates /aicg/'s acceptable use policy."
|
||||
# Show exact quota usage on the Server Info page
|
||||
QUOTA_DISPLAY_MODE=full
|
||||
```
|
||||
|
||||
See `.env.example` for a full list of available settings, or check `config.ts` for details on what each setting does.
|
||||
|
||||
Reference in New Issue
Block a user