mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-16 16:30:15 +01:00
🚀 feat: Add Custom Welcome Message in librechat.yaml (#5870)
* feat: Custom Welcome Message (#2967) * don't think I'm on the right path? * ✨ feat: Implement custom welcome message configuration in interface
This commit is contained in:
parent
b404e372ec
commit
2a74ceb630
4 changed files with 14 additions and 6 deletions
|
|
@ -34,6 +34,7 @@ async function loadDefaultInterface(config, configDefaults, roleName = SystemRol
|
||||||
multiConvo: interfaceConfig?.multiConvo ?? defaults.multiConvo,
|
multiConvo: interfaceConfig?.multiConvo ?? defaults.multiConvo,
|
||||||
agents: interfaceConfig?.agents ?? defaults.agents,
|
agents: interfaceConfig?.agents ?? defaults.agents,
|
||||||
temporaryChat: interfaceConfig?.temporaryChat ?? defaults.temporaryChat,
|
temporaryChat: interfaceConfig?.temporaryChat ?? defaults.temporaryChat,
|
||||||
|
customWelcome: interfaceConfig?.customWelcome ?? defaults.customWelcome,
|
||||||
});
|
});
|
||||||
|
|
||||||
await updateAccessPermissions(roleName, {
|
await updateAccessPermissions(roleName, {
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,9 @@ export default function Landing({ Header }: { Header?: ReactNode }) {
|
||||||
return localize('com_nav_welcome_agent');
|
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 (
|
return (
|
||||||
|
|
@ -118,10 +120,13 @@ export default function Landing({ Header }: { Header?: ReactNode }) {
|
||||||
<div className="flex flex-col items-center gap-0 p-2">
|
<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="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 ">
|
<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>
|
||||||
{/* <div className="mt-1 flex items-center gap-1 text-token-text-tertiary">
|
{/* <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> */}
|
||||||
</div>
|
</div>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ cache: true
|
||||||
|
|
||||||
# Custom interface configuration
|
# Custom interface configuration
|
||||||
interface:
|
interface:
|
||||||
|
customWelcome: "Welcome to LibreChat! Enjoy your experience."
|
||||||
# Privacy policy settings
|
# Privacy policy settings
|
||||||
privacyPolicy:
|
privacyPolicy:
|
||||||
externalUrl: 'https://librechat.ai/privacy-policy'
|
externalUrl: 'https://librechat.ai/privacy-policy'
|
||||||
|
|
@ -81,7 +82,7 @@ registration:
|
||||||
# model: ''
|
# model: ''
|
||||||
# voices: ['']
|
# voices: ['']
|
||||||
|
|
||||||
#
|
#
|
||||||
# stt:
|
# stt:
|
||||||
# openai:
|
# openai:
|
||||||
# url: ''
|
# url: ''
|
||||||
|
|
@ -234,10 +235,10 @@ endpoints:
|
||||||
# Recommended: Drop the stop parameter from the request as Openrouter models use a variety of stop tokens.
|
# Recommended: Drop the stop parameter from the request as Openrouter models use a variety of stop tokens.
|
||||||
dropParams: ['stop']
|
dropParams: ['stop']
|
||||||
modelDisplayLabel: 'OpenRouter'
|
modelDisplayLabel: 'OpenRouter'
|
||||||
|
|
||||||
# Portkey AI Example
|
# Portkey AI Example
|
||||||
- name: "Portkey"
|
- name: "Portkey"
|
||||||
apiKey: "dummy"
|
apiKey: "dummy"
|
||||||
baseURL: 'https://api.portkey.ai/v1'
|
baseURL: 'https://api.portkey.ai/v1'
|
||||||
headers:
|
headers:
|
||||||
x-portkey-api-key: '${PORTKEY_API_KEY}'
|
x-portkey-api-key: '${PORTKEY_API_KEY}'
|
||||||
|
|
|
||||||
|
|
@ -446,6 +446,7 @@ export const intefaceSchema = z
|
||||||
})
|
})
|
||||||
.optional(),
|
.optional(),
|
||||||
termsOfService: termsOfServiceSchema.optional(),
|
termsOfService: termsOfServiceSchema.optional(),
|
||||||
|
customWelcome: z.string().optional(),
|
||||||
endpointsMenu: z.boolean().optional(),
|
endpointsMenu: z.boolean().optional(),
|
||||||
modelSelect: z.boolean().optional(),
|
modelSelect: z.boolean().optional(),
|
||||||
parameters: z.boolean().optional(),
|
parameters: z.boolean().optional(),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue