Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🚀 feat: Add Custom Welcome Message in librechat.yaml #5870

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/server/services/start/interface.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ async function loadDefaultInterface(config, configDefaults, roleName = SystemRol
multiConvo: interfaceConfig?.multiConvo ?? defaults.multiConvo,
agents: interfaceConfig?.agents ?? defaults.agents,
temporaryChat: interfaceConfig?.temporaryChat ?? defaults.temporaryChat,
customWelcome: interfaceConfig?.customWelcome ?? defaults.customWelcome,
});

await updateAccessPermissions(roleName, {
Expand Down
11 changes: 8 additions & 3 deletions client/src/components/Chat/Landing.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@ export default function Landing({ Header }: { Header?: ReactNode }) {
return localize('com_nav_welcome_agent');
}

return localize('com_nav_welcome_message');
return typeof startupConfig?.interface?.customWelcome === 'string'
? startupConfig?.interface?.customWelcome
: localize('com_nav_welcome_message');
};

return (
Expand Down Expand Up @@ -118,10 +120,13 @@ export default function Landing({ Header }: { Header?: ReactNode }) {
<div className="flex flex-col items-center gap-0 p-2">
<div className="text-center text-2xl font-medium dark:text-white">{name}</div>
<div className="max-w-md text-center text-sm font-normal text-text-primary ">
{description ? description : localize('com_nav_welcome_message')}
{description ||
(typeof startupConfig?.interface?.customWelcome === 'string'
? startupConfig?.interface?.customWelcome
: localize('com_nav_welcome_message'))}
</div>
{/* <div className="mt-1 flex items-center gap-1 text-token-text-tertiary">
<div className="text-sm text-token-text-tertiary">By Daniel Avila</div>
<div className="text-sm text-token-text-tertiary">By Daniel Avila</div>
</div> */}
</div>
) : (
Expand Down
7 changes: 4 additions & 3 deletions librechat.example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cache: true

# Custom interface configuration
interface:
customWelcome: "Welcome to LibreChat! Enjoy your experience."
# Privacy policy settings
privacyPolicy:
externalUrl: 'https://librechat.ai/privacy-policy'
Expand Down Expand Up @@ -81,7 +82,7 @@ registration:
# model: ''
# voices: ['']

#
#
# stt:
# openai:
# url: ''
Expand Down Expand Up @@ -234,10 +235,10 @@ endpoints:
# Recommended: Drop the stop parameter from the request as Openrouter models use a variety of stop tokens.
dropParams: ['stop']
modelDisplayLabel: 'OpenRouter'

# Portkey AI Example
- name: "Portkey"
apiKey: "dummy"
apiKey: "dummy"
baseURL: 'https://api.portkey.ai/v1'
headers:
x-portkey-api-key: '${PORTKEY_API_KEY}'
Expand Down
1 change: 1 addition & 0 deletions packages/data-provider/src/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ export const intefaceSchema = z
})
.optional(),
termsOfService: termsOfServiceSchema.optional(),
customWelcome: z.string().optional(),
endpointsMenu: z.boolean().optional(),
modelSelect: z.boolean().optional(),
parameters: z.boolean().optional(),
Expand Down