feat: add configurable AI disclaimer below chat messages - #14803
Open
Dornheim-Tech wants to merge 1 commit into
Open
feat: add configurable AI disclaimer below chat messages#14803Dornheim-Tech wants to merge 1 commit into
Dornheim-Tech wants to merge 1 commit into
Conversation
Adds an optional interface.aiDisclaimer setting (i18n key or plain text) that renders a small disclaimer note below the chat, disabled by default.
|
This is great. We would use that ai disclaimer as well at our institute! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We add an optional
interface.aiDisclaimersetting that renders a small, unobtrusive disclaimer note below the chat messages (e.g. "AI can make mistakes, so you should verify the answers."). The setting accepts either an i18n key (such as the providedcom_ui_ai_disclaimer) or arbitrary plain text, and is disabled by default — when unset or empty, nothing is rendered and existing deployments are unaffected.Motivation:
For our company deployment of LibreChat we needed a persistent AI disclaimer that stays visible while chatting — a common requirement, especially in corporate or regulated environments. The only natural place for such a note today is the footer, which did not work for us for two reasons:
Rendering the note directly below the chat messages keeps it visible on all screen sizes without occupying the footer. We have been running this change in our deployment and are contributing it upstream as we believe it is useful for other installations as well.
Changes:
ChatDisclaimercomponent (client/src/components/Chat/Messages/ChatDisclaimer.tsx), rendered at the bottom ofMessagesView. It resolves the configured value as an i18n key with the raw value as fallback, so plain text works transparently. Marked asrole="note",pointer-events-noneand excluded from text selection.aiDisclaimerfield in theinterfaceconfig schema (packages/data-provider/src/config.ts), wired throughloadDefaultInterface(packages/data-schemas/src/app/interface.ts).com_ui_ai_disclaimer(English only — other locales are handled by the translation automation).librechat.example.yaml.Change Type
Testing
We tested the change in our Docker Compose based deployment as follows:
interface.aiDisclaimer→ no disclaimer is rendered (default behavior unchanged).aiDisclaimer: 'com_ui_ai_disclaimer'inlibrechat.yamlunderinterface:→ the localized default disclaimer appears below the chat messages, in the language of the UI.aiDisclaimer: 'Some custom plain text'→ the plain text is shown verbatim.aiDisclaimer: ''(empty/whitespace) → nothing is rendered.Test Configuration:
Checklist