Add temporary user tokens (khanon/oai-reverse-proxy!42)
This commit is contained in:
+84
-41
@@ -1,59 +1,102 @@
|
||||
# Copy this file to .env and fill in the values you wish to change. Most already
|
||||
# have sensible defaults. See config.ts for more details.
|
||||
# To customize your server, make a copy of this file to `.env` and edit any
|
||||
# values you want to change. Be sure to remove the `#` at the beginning of each
|
||||
# line you want to modify.
|
||||
|
||||
# PORT=7860
|
||||
# SERVER_TITLE=Coom Tunnel
|
||||
# MODEL_RATE_LIMIT=4
|
||||
# MAX_OUTPUT_TOKENS_OPENAI=300
|
||||
# MAX_OUTPUT_TOKENS_ANTHROPIC=900
|
||||
# SHOW_TOKEN_COSTS=true
|
||||
# LOG_LEVEL=info
|
||||
# REJECT_DISALLOWED=false
|
||||
# REJECT_MESSAGE="This content violates /aicg/'s acceptable use policy."
|
||||
# CHECK_KEYS=true
|
||||
# ALLOWED_MODEL_FAMILIES=claude,turbo,gpt4,gpt4-32k
|
||||
# BLOCKED_ORIGINS=reddit.com,9gag.com
|
||||
# BLOCK_MESSAGE="You must be over the age of majority in your country to use this service."
|
||||
# BLOCK_REDIRECT="https://roblox.com/"
|
||||
|
||||
# Note: CHECK_KEYS is disabled by default in local development mode, but enabled
|
||||
# by default in production mode.
|
||||
|
||||
# Optional settings for user management, access control, and quota enforcement.
|
||||
# See `docs/user-management.md` to learn how to use these.
|
||||
# See `docs/user-quotas.md` to learn how to use quotas.
|
||||
# GATEKEEPER=none
|
||||
# GATEKEEPER_STORE=memory
|
||||
# MAX_IPS_PER_USER=20
|
||||
# TOKEN_QUOTA_TURBO=0
|
||||
# TOKEN_QUOTA_GPT4=0
|
||||
# TOKEN_QUOTA_CLAUDE=0
|
||||
# QUOTA_REFRESH_PERIOD=daily
|
||||
# ALLOW_NICKNAME_CHANGES=true
|
||||
|
||||
# Optional settings for prompt logging. See docs/logging-sheets.md.
|
||||
# PROMPT_LOGGING=false
|
||||
# All values have reasonable defaults, so you only need to change the ones you
|
||||
# want to override.
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# The values below are secret -- make sure they are set securely. Do NOT set
|
||||
# them in the .env file of a public repository.
|
||||
# General settings:
|
||||
|
||||
# The title displayed on the info page.
|
||||
# SERVER_TITLE=Coom Tunnel
|
||||
|
||||
# Model requests allowed per minute per user.
|
||||
# MODEL_RATE_LIMIT=4
|
||||
|
||||
# Max number of output tokens a user can request at once.
|
||||
# MAX_OUTPUT_TOKENS_OPENAI=300
|
||||
# MAX_OUTPUT_TOKENS_ANTHROPIC=400
|
||||
|
||||
# Whether to show the estimated cost of consumed tokens on the info page.
|
||||
# SHOW_TOKEN_COSTS=false
|
||||
|
||||
# Whether to automatically check API keys for validity.
|
||||
# Note: CHECK_KEYS is disabled by default in local development mode, but enabled
|
||||
# by default in production mode.
|
||||
# CHECK_KEYS=true
|
||||
|
||||
# Which model types users are allowed to access.
|
||||
# ALLOWED_MODEL_FAMILIES=claude,turbo,gpt4,gpt4-32k
|
||||
|
||||
# URLs from which requests will be blocked.
|
||||
# BLOCKED_ORIGINS=reddit.com,9gag.com
|
||||
# Message to show when requests are blocked.
|
||||
# BLOCK_MESSAGE="You must be over the age of majority in your country to use this service."
|
||||
# Destination to redirect blocked requests to.
|
||||
# BLOCK_REDIRECT="https://roblox.com/"
|
||||
|
||||
# Whether to reject requests containing disallowed content.
|
||||
# REJECT_DISALLOWED=false
|
||||
# Message to show when requests are rejected.
|
||||
# REJECT_MESSAGE="This content violates /aicg/'s acceptable use policy."
|
||||
|
||||
# Whether prompts should be logged to Google Sheets.
|
||||
# Requires additional setup. See `docs/google-sheets.md` for more information.
|
||||
# PROMPT_LOGGING=false
|
||||
|
||||
# The port to listen on.
|
||||
# PORT=7860
|
||||
|
||||
# Detail level of logging. (trace | debug | info | warn | error)
|
||||
# LOG_LEVEL=info
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Optional settings for user management, access control, and quota enforcement:
|
||||
# See `docs/user-management.md` for more information and setup instructions.
|
||||
# See `docs/user-quotas.md` to learn how to set up quotas.
|
||||
|
||||
# Which access control method to use. (none | proxy_token | user_token)
|
||||
# GATEKEEPER=none
|
||||
# Which persistence method to use. (memory | firebase_rtdb)
|
||||
# GATEKEEPER_STORE=memory
|
||||
|
||||
# Maximum number of unique IPs a user can connect from. (0 for unlimited)
|
||||
# MAX_IPS_PER_USER=0
|
||||
|
||||
# With user_token gatekeeper, whether to allow users to change their nickname.
|
||||
# ALLOW_NICKNAME_CHANGES=true
|
||||
|
||||
# Default token quotas for each model family. (0 for unlimited)
|
||||
# TOKEN_QUOTA_TURBO=0
|
||||
# TOKEN_QUOTA_GPT4=0
|
||||
# TOKEN_QUOTA_GPT4_32K=0
|
||||
# TOKEN_QUOTA_CLAUDE=0
|
||||
|
||||
# How often to refresh token quotas. (hourly | daily)
|
||||
# Leave unset to never automatically refresh quotas.
|
||||
# QUOTA_REFRESH_PERIOD=daily
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Secrets and keys:
|
||||
# Do not put any passwords or API keys directly in this file.
|
||||
# For Huggingface, set them via the Secrets section in your Space's config UI.
|
||||
# For Render, create a "secret file" called .env using the Environment tab.
|
||||
|
||||
# You can add multiple keys by separating them with a comma.
|
||||
# You can add multiple API keys by separating them with a comma.
|
||||
OPENAI_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
ANTHROPIC_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
# You can require a Bearer token for requests when using proxy_token gatekeeper.
|
||||
# With proxy_key gatekeeper, the password users must provide to access the API.
|
||||
# PROXY_KEY=your-secret-key
|
||||
|
||||
# You can set an admin key for user management when using user_token gatekeeper.
|
||||
# With user_token gatekeeper, the admin password used to manage users.
|
||||
# ADMIN_KEY=your-very-secret-key
|
||||
|
||||
# These are used to persist user data to Firebase across restarts.
|
||||
# With firebase_rtdb gatekeeper storage, the Firebase project credentials.
|
||||
# FIREBASE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# FIREBASE_RTDB_URL=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.firebaseio.com
|
||||
|
||||
# These are used to log prompts to Google Sheets.
|
||||
# With prompt logging, the Google Sheets credentials.
|
||||
# GOOGLE_SHEETS_SPREADSHEET_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
# GOOGLE_SHEETS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
|
||||
|
||||
Reference in New Issue
Block a user