Spaces:
Paused
Paused
feat: allow custom message to guest users. (#1441)
Browse files* feat: allow custom guest message.
* remove the messages_before_login condition.
* fix: lint
---------
Co-authored-by: Khattab, Sameh <[email protected]>
Co-authored-by: Nathan Sarrazin <[email protected]>
- .env +1 -0
- chart/env/prod.yaml +1 -0
- src/lib/components/LoginModal.svelte +1 -3
.env
CHANGED
|
@@ -132,6 +132,7 @@ PARQUET_EXPORT_SECRET=#DEPRECATED, use ADMIN_API_SECRET instead
|
|
| 132 |
|
| 133 |
RATE_LIMIT= # /!\ Legacy definition of messages per minute. Use USAGE_LIMITS.messagesPerMinute instead
|
| 134 |
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
|
|
|
|
| 135 |
|
| 136 |
APP_BASE="" # base path of the app, e.g. /chat, left blank as default
|
| 137 |
PUBLIC_APP_NAME=ChatUI # name used as title throughout the app
|
|
|
|
| 132 |
|
| 133 |
RATE_LIMIT= # /!\ Legacy definition of messages per minute. Use USAGE_LIMITS.messagesPerMinute instead
|
| 134 |
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
|
| 135 |
+
PUBLIC_APP_GUEST_MESSAGE=# a message to the guest user. If not set, a default message will be used
|
| 136 |
|
| 137 |
APP_BASE="" # base path of the app, e.g. /chat, left blank as default
|
| 138 |
PUBLIC_APP_NAME=ChatUI # name used as title throughout the app
|
chart/env/prod.yaml
CHANGED
|
@@ -285,6 +285,7 @@ envVars:
|
|
| 285 |
PUBLIC_APP_COLOR: "yellow"
|
| 286 |
PUBLIC_APP_DESCRIPTION: "Making the community's best AI chat models available to everyone."
|
| 287 |
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."
|
|
|
|
| 288 |
PUBLIC_APP_DATA_SHARING: 0
|
| 289 |
PUBLIC_APP_DISCLAIMER: 1
|
| 290 |
PUBLIC_PLAUSIBLE_SCRIPT_URL: "/js/script.js"
|
|
|
|
| 285 |
PUBLIC_APP_COLOR: "yellow"
|
| 286 |
PUBLIC_APP_DESCRIPTION: "Making the community's best AI chat models available to everyone."
|
| 287 |
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."
|
| 288 |
+
PUBLIC_APP_GUEST_MESSAGE: "You have reached the guest message limit, Sign In with a free Hugging Face account to continue using HuggingChat."
|
| 289 |
PUBLIC_APP_DATA_SHARING: 0
|
| 290 |
PUBLIC_APP_DISCLAIMER: 1
|
| 291 |
PUBLIC_PLAUSIBLE_SCRIPT_URL: "/js/script.js"
|
src/lib/components/LoginModal.svelte
CHANGED
|
@@ -23,9 +23,7 @@
|
|
| 23 |
{envPublic.PUBLIC_APP_DESCRIPTION}
|
| 24 |
</p>
|
| 25 |
<p class="text-balance rounded-xl border bg-white/80 p-2 text-base text-gray-800">
|
| 26 |
-
|
| 27 |
-
>Sign In with a free Hugging Face account</strong
|
| 28 |
-
> to continue using HuggingChat.
|
| 29 |
</p>
|
| 30 |
|
| 31 |
<form
|
|
|
|
| 23 |
{envPublic.PUBLIC_APP_DESCRIPTION}
|
| 24 |
</p>
|
| 25 |
<p class="text-balance rounded-xl border bg-white/80 p-2 text-base text-gray-800">
|
| 26 |
+
{envPublic.PUBLIC_APP_GUEST_MESSAGE}
|
|
|
|
|
|
|
| 27 |
</p>
|
| 28 |
|
| 29 |
<form
|