Skip to content

Commit f25eaf3

Browse files
samehkhattabKhattab, Samehnsarrazin
authored
feat: allow custom message to guest users. (#1441)
* feat: allow custom guest message. * remove the messages_before_login condition. * fix: lint --------- Co-authored-by: Khattab, Sameh <sameh.khattab@uk-essen.de> Co-authored-by: Nathan Sarrazin <sarrazin.nathan@gmail.com>
1 parent c1bac2c commit f25eaf3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ PARQUET_EXPORT_SECRET=#DEPRECATED, use ADMIN_API_SECRET instead
132132

133133
RATE_LIMIT= # /!\ Legacy definition of messages per minute. Use USAGE_LIMITS.messagesPerMinute instead
134134
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
135136

136137
APP_BASE="" # base path of the app, e.g. /chat, left blank as default
137138
PUBLIC_APP_NAME=ChatUI # name used as title throughout the app

chart/env/prod.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ envVars:
285285
PUBLIC_APP_COLOR: "yellow"
286286
PUBLIC_APP_DESCRIPTION: "Making the community's best AI chat models available to everyone."
287287
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."
288289
PUBLIC_APP_DATA_SHARING: 0
289290
PUBLIC_APP_DISCLAIMER: 1
290291
PUBLIC_PLAUSIBLE_SCRIPT_URL: "/js/script.js"

src/lib/components/LoginModal.svelte

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
{envPublic.PUBLIC_APP_DESCRIPTION}
2424
</p>
2525
<p class="text-balance rounded-xl border bg-white/80 p-2 text-base text-gray-800">
26-
You have reached the guest message limit, <strong class="font-semibold"
27-
>Sign In with a free Hugging Face account</strong
28-
> to continue using HuggingChat.
26+
{envPublic.PUBLIC_APP_GUEST_MESSAGE}
2927
</p>
3028

3129
<form

0 commit comments

Comments
 (0)