prxyasd commited on
Commit
6e2468b
·
verified ·
1 Parent(s): c3dc1af

Create .env

Browse files
Files changed (1) hide show
  1. .env +156 -0
.env ADDED
@@ -0,0 +1,156 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ # The title displayed on the info page.
3
+ # SERVER_TITLE=Coom Tunnel
4
+
5
+ # The route name used to proxy requests to APIs, relative to the Web site root.
6
+ # PROXY_ENDPOINT_ROUTE=/proxy
7
+
8
+ # Text model requests allowed per minute per user.
9
+ TEXT_MODEL_RATE_LIMIT=4
10
+ # Image model requests allowed per minute per user.
11
+ # IMAGE_MODEL_RATE_LIMIT=2
12
+
13
+ # Max number of context tokens a user can request at once.
14
+ # Increase this if your proxy allow GPT 32k or 128k context
15
+ MAX_CONTEXT_TOKENS_OPENAI=100000
16
+
17
+ # Max number of output tokens a user can request at once.
18
+ MAX_OUTPUT_TOKENS_OPENAI=1500
19
+ MAX_OUTPUT_TOKENS_ANTHROPIC=1500
20
+
21
+ # Whether to show the estimated cost of consumed tokens on the info page.
22
+ # SHOW_TOKEN_COSTS=false
23
+
24
+ # Whether to automatically check API keys for validity.
25
+ # Note: CHECK_KEYS is disabled by default in local development mode, but enabled
26
+ # by default in production mode.
27
+ # CHECK_KEYS=true
28
+
29
+ # Which model types users are allowed to access.
30
+ # The following model families are recognized:
31
+ # turbo | gpt4 | gpt4-32k | gpt4-turbo | gpt4o | dall-e | claude | claude-opus | gemini-pro | mistral-tiny | mistral-small | mistral-medium | mistral-large | aws-claude | aws-claude-opus | azure-turbo | azure-gpt4 | azure-gpt4-32k | azure-gpt4-turbo | azure-gpt4o | azure-dall-e
32
+ # By default, all models are allowed except for 'dall-e' / 'azure-dall-e'.
33
+ # To allow DALL-E image generation, uncomment the line below and add 'dall-e' or
34
+ # 'azure-dall-e' to the list of allowed model families.
35
+ ALLOWED_MODEL_FAMILIES=gpt4o,claude
36
+
37
+ # Which services can be used to process prompts containing images via multimodal
38
+ # models. The following services are recognized:
39
+ # openai | anthropic | aws | azure | google-ai | mistral-ai
40
+ # Do not enable this feature unless all users are trusted, as you will be liable
41
+ # for any user-submitted images containing illegal content.
42
+ # By default, no image services are allowed and image prompts are rejected.
43
+ # ALLOWED_VISION_SERVICES=
44
+
45
+ # IP addresses or CIDR blocks from which requests will be blocked.
46
+ # IP_BLACKLIST=10.0.0.1/24
47
+ # URLs from which requests will be blocked.
48
+ # BLOCKED_ORIGINS=reddit.com,9gag.com
49
+ # Message to show when requests are blocked.
50
+ # BLOCK_MESSAGE="You must be over the age of majority in your country to use this service."
51
+ # Destination to redirect blocked requests to.
52
+ # BLOCK_REDIRECT="https://roblox.com/"
53
+
54
+ # Comma-separated list of phrases that will be rejected. Only whole words are matched.
55
+ # Surround phrases with quotes if they contain commas.
56
+ # Avoid short or common phrases as this tests the entire prompt.
57
+ # REJECT_PHRASES="phrase one,phrase two,"phrase three, which has a comma",phrase four"
58
+ # Message to show when requests are rejected.
59
+ # REJECT_MESSAGE="You can't say that here."
60
+
61
+ # Whether prompts should be logged to Google Sheets.
62
+ # Requires additional setup. See `docs/google-sheets.md` for more information.
63
+ # PROMPT_LOGGING=false
64
+
65
+ # The port and network interface to listen on.
66
+ # PORT=7860
67
+ # BIND_ADDRESS=0.0.0.0
68
+
69
+ # Whether cookies should be set without the Secure flag, for hosts that don't support SSL.
70
+ # USE_INSECURE_COOKIES=false
71
+
72
+ # Detail level of logging. (trace | debug | info | warn | error)
73
+ # LOG_LEVEL=info
74
+
75
+ # Captcha verification settings. Refer to docs/pow-captcha.md for guidance.
76
+ # CAPTCHA_MODE=none
77
+ # POW_TOKEN_HOURS=24
78
+ # POW_TOKEN_MAX_IPS=2
79
+ # POW_DIFFICULTY_LEVEL=low
80
+ # POW_CHALLENGE_TIMEOUT=30
81
+
82
+ # ------------------------------------------------------------------------------
83
+ # Optional settings for user management, access control, and quota enforcement:
84
+ # See `docs/user-management.md` for more information and setup instructions.
85
+ # See `docs/user-quotas.md` to learn how to set up quotas.
86
+
87
+ # Which access control method to use. (none | proxy_key | user_token)
88
+ GATEKEEPER=proxy_key
89
+ # Which persistence method to use. (memory | firebase_rtdb)
90
+ # GATEKEEPER_STORE=memory
91
+
92
+ # Maximum number of unique IPs a user can connect from. (0 for unlimited)
93
+ # MAX_IPS_PER_USER=0
94
+ # Whether user_tokens should be automatically disabled when reaching the IP limit.
95
+ # MAX_IPS_AUTO_BAN=true
96
+
97
+ # With user_token gatekeeper, whether to allow users to change their nickname.
98
+ # ALLOW_NICKNAME_CHANGES=true
99
+
100
+ # Default token quotas for each model family. (0 for unlimited)
101
+ # Specify as TOKEN_QUOTA_MODEL_FAMILY=value, replacing dashes with underscores.
102
+ # TOKEN_QUOTA_TURBO=0
103
+ # TOKEN_QUOTA_GPT4=0
104
+ # TOKEN_QUOTA_GPT4_32K=0
105
+ # TOKEN_QUOTA_GPT4_TURBO=0
106
+ # TOKEN_QUOTA_CLAUDE=0
107
+ # TOKEN_QUOTA_GEMINI_PRO=0
108
+ # TOKEN_QUOTA_AWS_CLAUDE=0
109
+ # "Tokens" for image-generation models are counted at a rate of 100000 tokens
110
+ # per US$1.00 generated, which is similar to the cost of GPT-4 Turbo.
111
+ # DALL-E 3 costs around US$0.10 per image (10000 tokens).
112
+ # See `docs/dall-e-configuration.md` for more information.
113
+ # TOKEN_QUOTA_DALL_E=0
114
+
115
+ # How often to refresh token quotas. (hourly | daily)
116
+ # Leave unset to never automatically refresh quotas.
117
+ # QUOTA_REFRESH_PERIOD=daily
118
+
119
+ # Specifies the number of proxies or load balancers in front of the server.
120
+ # For Cloudflare or Hugging Face deployments, the default of 1 is correct.
121
+ # For any other deployments, please see config.ts as the correct configuration
122
+ # depends on your setup. Misconfiguring this value can result in problems
123
+ # accurately tracking IP addresses and enforcing rate limits.
124
+ # TRUSTED_PROXIES=1
125
+
126
+ # ------------------------------------------------------------------------------
127
+ # Secrets and keys:
128
+ # For Huggingface, set them via the Secrets section in your Space's config UI. Dp not set them in .env.
129
+ # For Render, create a "secret file" called .env using the Environment tab.
130
+
131
+ # You can add multiple API keys by separating them with a comma.
132
+ # For AWS credentials, separate the access key ID, secret key, and region with a colon.
133
+ OPENAI_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
134
+ ANTHROPIC_KEY=sk-ant-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
135
+ # See `docs/aws-configuration.md` for more information, there may be additional steps required to set up AWS.
136
+ #AWS_CREDENTIALS=myaccesskeyid:mysecretkey:us-east-1,anotheraccesskeyid:anothersecretkey:us-west-2
137
+ # See `docs/azure-configuration.md` for more information, there may be additional steps required to set up Azure.
138
+ #AZURE_CREDENTIALS=azure-resource-name:deployment-id:api-key,another-azure-resource-name:another-deployment-id:another-api-key
139
+
140
+ # With proxy_key gatekeeper, the password users must provide to access the API.
141
+ # PROXY_KEY=your-secret-key
142
+
143
+ # With user_token gatekeeper, the admin password used to manage users.
144
+ # ADMIN_KEY=your-very-secret-key
145
+ # To restrict access to the admin interface to specific IP addresses, set the
146
+ # ADMIN_WHITELIST environment variable to a comma-separated list of CIDR blocks.
147
+ # ADMIN_WHITELIST=0.0.0.0/0
148
+
149
+
150
+ # With firebase_rtdb gatekeeper storage, the Firebase project credentials.
151
+ # FIREBASE_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
152
+ # FIREBASE_RTDB_URL=https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.firebaseio.com
153
+
154
+ # With prompt logging, the Google Sheets credentials.
155
+ # GOOGLE_SHEETS_SPREADSHEET_ID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
156
+ # GOOGLE_SHEETS_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx