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
# HF_TOKEN is used for a lot of things, not only for inference but also fetching tokenizers, etc.
13
+
# We recommend using an HF_TOKEN even if you use a local endpoint.
14
+
HF_TOKEN=#get it from https://huggingface.co/settings/token
15
+
# API Keys for providers, you will need to specify models in the MODELS section but these keys can be kept secret
14
16
OPENAI_API_KEY=#your openai api key here
15
17
ANTHROPIC_API_KEY=#your anthropic api key here
16
18
CLOUDFLARE_ACCOUNT_ID=#your cloudflare account id here
17
19
CLOUDFLARE_API_TOKEN=#your cloudflare api token here
18
20
COHERE_API_TOKEN=#your cohere api token here
21
+
GOOGLE_GENAI_API_KEY=#your google genai api token here
19
22
20
-
HF_ACCESS_TOKEN=#LEGACY! Use HF_TOKEN instead
21
-
22
-
# used to activate search with web functionality. disabled if none are defined. choose one of the following:
23
-
YDC_API_KEY=#your docs.you.com api key here
24
-
SERPER_API_KEY=#your serper.dev api key here
25
-
SERPAPI_KEY=#your serpapi key here
26
-
SERPSTACK_API_KEY=#your serpstack api key here
27
-
SEARCHAPI_KEY=#your searchapi api key here
28
-
USE_LOCAL_WEBSEARCH=#set to true to parse google results yourself, overrides other API keys
29
-
SEARXNG_QUERY_URL=# where '<query>' will be replaced with query keywords see https://docs.searxng.org/dev/search_api.html eg https://searxng.yourdomain.com/search?q=<query>&engines=duckduckgo,google&format=json
30
-
PLAYWRIGHT_ADBLOCKER=true
31
-
32
-
WEBSEARCH_ALLOWLIST=`[]`# if it's defined, allow websites from only this list.
33
-
WEBSEARCH_BLOCKLIST=`[]`# if it's defined, block websites from this list.
34
-
WEBSEARCH_JAVASCRIPT=true# CPU usage reduces by 60% on average by disabling javascript. Enable to improve website compatibility
35
-
36
-
# Parameters to enable open id login
37
-
OPENID_CONFIG=`{
38
-
"PROVIDER_URL": "",
39
-
"CLIENT_ID": "",
40
-
"CLIENT_SECRET": "",
41
-
"SCOPES": "",
42
-
"NAME_CLAIM": ""
43
-
}`
44
-
45
-
# /!\ legacy openid settings, prefer the config above
46
-
OPENID_CLIENT_ID=
47
-
OPENID_CLIENT_SECRET=
48
-
OPENID_SCOPES="openid profile" # Add "email" for some providers like Google that do not provide preferred_username
49
-
OPENID_NAME_CLAIM="name" # Change to "username" for some providers that do not provide name
50
-
OPENID_PROVIDER_URL=https://huggingface.co# for Google, use https://accounts.google.com
51
-
OPENID_TOLERANCE=
52
-
OPENID_RESOURCE=
53
-
54
-
# Parameters to enable a global mTLS context for client fetch requests
55
-
USE_CLIENT_CERTIFICATE=false
56
-
CERT_PATH=#
57
-
KEY_PATH=#
58
-
CA_PATH=#
59
-
CLIENT_KEY_PASSWORD=#
60
-
REJECT_UNAUTHORIZED=true
61
-
62
-
TEXT_EMBEDDING_MODELS=`[
63
-
{
64
-
"name": "Xenova/gte-small",
65
-
"displayName": "Xenova/gte-small",
66
-
"description": "Local embedding model running on the server.",
67
-
"chunkCharLength": 512,
68
-
"endpoints": [
69
-
{ "type": "transformersjs" }
70
-
]
71
-
}
72
-
]`
73
23
74
-
# 'name', 'userMessageToken', 'assistantMessageToken' are required
24
+
### Models ###
25
+
## Models can support many different endpoints, check the documentation for more details
ADMIN_API_SECRET=# secret to admin API calls, like computing usage stats or exporting parquet data
62
+
## Task model
63
+
# name of the model used for tasks such as summarizing title, creating query, etc.
64
+
# if not set, the first model in MODELS will be used
65
+
TASK_MODEL=
127
66
128
-
PARQUET_EXPORT_SECRET=#DEPRECATED, use ADMIN_API_SECRET instead
129
67
130
-
RATE_LIMIT=# /!\ Legacy definition of messages per minute. Use USAGE_LIMITS.messagesPerMinute instead
68
+
### Authentication ###
69
+
# Parameters to enable open id login
70
+
OPENID_CONFIG=
131
71
MESSAGES_BEFORE_LOGIN=# how many messages a user can send in a conversation before having to login. set to 0 to force login right away
72
+
# if it's defined, only these emails will be allowed to use login
73
+
ALLOWED_USER_EMAILS=`[]`
74
+
# If it's defined, users with emails matching these domains will also be allowed to use login
75
+
ALLOWED_USER_DOMAINS=`[]`
76
+
# valid alternative redirect URLs for OAuth, used for HuggingChat apps
77
+
ALTERNATIVE_REDIRECT_URLS=`[]`
78
+
### Cookies
79
+
# name of the cookie used to store the session
80
+
COOKIE_NAME=hf-chat
81
+
# specify secure behaviour for cookies
82
+
COOKIE_SAMESITE=# can be "lax", "strict", "none" or left empty
83
+
COOKIE_SECURE=# set to true to only allow cookies over https
132
84
133
-
APP_BASE="" # base path of the app, e.g. /chat, left blank as default
85
+
86
+
### Websearch ###
87
+
## API Keys used to activate search with web functionality. websearch is disabled if none are defined. choose one of the following:
88
+
YDC_API_KEY=#your docs.you.com api key here
89
+
SERPER_API_KEY=#your serper.dev api key here
90
+
SERPAPI_KEY=#your serpapi key here
91
+
SERPSTACK_API_KEY=#your serpstack api key here
92
+
SEARCHAPI_KEY=#your searchapi api key here
93
+
USE_LOCAL_WEBSEARCH=#set to true to parse google results yourself, overrides other API keys
94
+
SEARXNG_QUERY_URL=# where '<query>' will be replaced with query keywords see https://docs.searxng.org/dev/search_api.html eg https://searxng.yourdomain.com/search?q=<query>&engines=duckduckgo,google&format=json
95
+
BING_SUBSCRIPTION_KEY=#your key
96
+
## Websearch configuration
97
+
PLAYWRIGHT_ADBLOCKER=true
98
+
WEBSEARCH_ALLOWLIST=`[]`# if it's defined, allow websites from only this list.
99
+
WEBSEARCH_BLOCKLIST=`[]`# if it's defined, block websites from this list.
100
+
WEBSEARCH_JAVASCRIPT=true# CPU usage reduces by 60% on average by disabling javascript. Enable to improve website compatibility
101
+
WEBSEARCH_TIMEOUT=3500# in milliseconds, determines how long to wait to load a page before timing out
102
+
ENABLE_LOCAL_FETCH=false#set to true to allow fetches on the local network. /!\ Only enable this if you have the proper firewall rules to prevent SSRF attacks and understand the implications.
103
+
104
+
105
+
## Public app configuration ##
106
+
PUBLIC_APP_GUEST_MESSAGE=# a message to the guest user. If not set, no message will be shown. Only used if you have authentication enabled.
134
107
PUBLIC_APP_NAME=ChatUI# name used as title throughout the app
135
108
PUBLIC_APP_ASSETS=chatui# used to find logos & favicons in static/$PUBLIC_APP_ASSETS
136
-
PUBLIC_APP_COLOR=blue# can be any of tailwind colors: https://tailwindcss.com/docs/customizing-colors#default-color-palette
137
-
PUBLIC_APP_DESCRIPTION=# description used throughout the app (if not set, a default one will be used)
138
-
PUBLIC_APP_DATA_SHARING=#set to 1 to enable options & text regarding data sharing
139
-
PUBLIC_APP_DISCLAIMER=#set to 1 to show a disclaimer on login page
140
-
PUBLIC_APP_DISCLAIMER_MESSAGE="Disclaimer: AI is an area of active research with known problems such as biased generation and misinformation. Do not use this application for high-stakes decisions or advice. Do not insert your personal data, especially sensitive, like health data."
141
-
LLM_SUMMARIZATION=true
142
-
143
-
EXPOSE_API=true
144
-
# PUBLIC_APP_NAME=HuggingChat
145
-
# PUBLIC_APP_ASSETS=huggingchat
146
-
# PUBLIC_APP_COLOR=yellow
147
-
# PUBLIC_APP_DESCRIPTION="Making the community's best AI chat models available to everyone."
148
-
# PUBLIC_APP_DATA_SHARING=1
149
-
# PUBLIC_APP_DISCLAIMER=1
109
+
PUBLIC_APP_DESCRIPTION=# description used throughout the app
110
+
PUBLIC_APP_DATA_SHARING=# Set to 1 to enable an option in the user settings to share conversations with model authors
111
+
PUBLIC_APP_DISCLAIMER=# Set to 1 to show a disclaimer on login page
112
+
PUBLIC_APP_DISCLAIMER_MESSAGE=# Message to show on the login page
PUBLIC_SMOOTH_UPDATES=false# set to true to enable smoothing of messages client-side, can be CPU intensive
121
+
PUBLIC_ORIGIN=#https://huggingface.co
122
+
PUBLIC_SHARE_PREFIX=#https://hf.co/chat
150
123
124
+
# mostly huggingchat specific
125
+
PUBLIC_GOOGLE_ANALYTICS_ID=#G-XXXXXXXX / Leave empty to disable
126
+
PUBLIC_PLAUSIBLE_SCRIPT_URL=#/js/script.js / Leave empty to disable
127
+
PUBLIC_APPLE_APP_ID=#1234567890 / Leave empty to disable
128
+
129
+
130
+
### Feature Flags ###
131
+
LLM_SUMMARIZATION=true# generate conversation titles with LLMs
151
132
ENABLE_ASSISTANTS=false#set to true to enable assistants feature
152
133
ENABLE_ASSISTANTS_RAG=false# /!\ This will let users specify arbitrary URLs that the server will then request. Make sure you have the proper firewall rules in place.
153
-
REQUIRE_FEATURED_ASSISTANTS=false
154
-
ENABLE_LOCAL_FETCH=false#set to true to disable the blocklist for local fetches. Only enable this if you have the proper firewall rules to prevent SSRF attacks and understand the implications.
155
-
ALTERNATIVE_REDIRECT_URLS=`[]`#valide alternative redirect URL for OAuth
156
-
WEBHOOK_URL_REPORT_ASSISTANT=#provide webhook url to get notified when an assistant gets reported
134
+
REQUIRE_FEATURED_ASSISTANTS=false# require featured assistants to show in the list
135
+
COMMUNITY_TOOLS=false# set to true to enable community tools
136
+
EXPOSE_API=true# make the /api routes available
137
+
ALLOW_IFRAME=true# Allow the app to be embedded in an iframe
138
+
139
+
140
+
### Tools ###
141
+
# Check out public config in `chart/env/prod.yaml` for more details
142
+
TOOLS=`[]`
143
+
144
+
### Rate limits ###
145
+
# See `src/lib/server/usageLimits.ts`
146
+
# {
147
+
# conversations: number, # how many conversations
148
+
# messages: number, # how many messages in a conversation
149
+
# assistants: number, # how many assistants
150
+
# messageLength: number, # how long can a message be before we cut it off
151
+
# messagesPerMinute: number, # how many messages per minute
152
+
# tools: number # how many tools
153
+
# }
154
+
USAGE_LIMITS=`{}`
157
155
158
-
ALLOWED_USER_EMAILS=`[]`# if it's defined, only these emails will be allowed to use the app
159
156
160
-
USAGE_LIMITS=`{}`
157
+
### HuggingFace specific ###
158
+
# Let user authenticate with their HF token in the /api routes. This is only useful if you have OAuth configured with huggingface.
159
+
USE_HF_TOKEN_IN_API=false
160
+
## Feature flag & admin settings
161
+
# Used for setting early access & admin flags to users
162
+
HF_ORG_ADMIN=
163
+
HF_ORG_EARLY_ACCESS=
164
+
WEBHOOK_URL_REPORT_ASSISTANT=#provide slack webhook url to get notified for reports/feature requests
161
165
162
-
ALLOW_INSECURE_COOKIES=false# recommended to keep this to false but set to true if you need to run over http without tls
166
+
167
+
168
+
### Metrics ###
163
169
METRICS_ENABLED=false
164
170
METRICS_PORT=5565
165
171
LOG_LEVEL=info
172
+
173
+
174
+
### Parquet export ###
175
+
# Not in use anymore but useful to export conversations to a parquet file as a HuggingFace dataset
176
+
PARQUET_EXPORT_DATASET=
177
+
PARQUET_EXPORT_HF_TOKEN=
178
+
ADMIN_API_SECRET=# secret to admin API calls, like computing usage stats or exporting parquet data
179
+
180
+
181
+
### Docker build variables ###
182
+
# These values cannot be updated at runtime
183
+
# They need to be passed when building the docker image
184
+
# See https://github.com/huggingface/chat-ui/main/.github/workflows/deploy-prod.yml#L44-L47
185
+
APP_BASE="" # base path of the app, e.g. /chat, left blank as default
186
+
PUBLIC_APP_COLOR=blue# can be any of tailwind colors: https://tailwindcss.com/docs/customizing-colors#default-color-palette
187
+
### Body size limit for SvelteKit https://svelte.dev/docs/kit/adapter-node#Environment-variables-BODY_SIZE_LIMIT
166
188
BODY_SIZE_LIMIT=15728640
189
+
PUBLIC_COMMIT_SHA=
190
+
191
+
### LEGACY parameters
192
+
HF_ACCESS_TOKEN=#LEGACY! Use HF_TOKEN instead
193
+
ALLOW_INSECURE_COOKIES=false# LEGACY! Use COOKIE_SECURE and COOKIE_SAMESITE instead
194
+
PARQUET_EXPORT_SECRET=#DEPRECATED, use ADMIN_API_SECRET instead
195
+
RATE_LIMIT=# /!\ DEPRECATED definition of messages per minute. Use USAGE_LIMITS.messagesPerMinute instead
196
+
OPENID_CLIENT_ID=
197
+
OPENID_CLIENT_SECRET=
198
+
OPENID_SCOPES="openid profile" # Add "email" for some providers like Google that do not provide preferred_username
199
+
OPENID_NAME_CLAIM="name" # Change to "username" for some providers that do not provide name
200
+
OPENID_PROVIDER_URL=https://huggingface.co# for Google, use https://accounts.google.com
**Please use the discussions on GitHub** for getting help with setting things up instead of opening an issue: https://github.com/huggingface/chat-ui/discussions
about: Suggest new features to be added to chat-ui
4
+
title: ""
5
+
labels: enhancement
6
+
assignees: ""
7
+
---
8
+
9
+
## Describe your feature request
10
+
11
+
<!-- Short description of what this is about -->
12
+
13
+
## Screenshots (if relevant)
14
+
15
+
## Implementation idea
16
+
17
+
<!-- If you know how this should be implemented in the codebase, share your thoughts. Let us know if you feel like implementing it yourself as well! -->
0 commit comments