FEAT : Disabling markdown/latex rendering for user_messages
Description:
Currently, Chainlit automatically renders Markdown and LaTeX syntax in user messages.
While this is beneficial in many scenarios, there are cases where such rendering is undesirable.
For instance, when user input includes characters like # or $ that are intended as literals rather than Markdown or LaTeX syntax, automatic rendering can lead to misinterpretation of the message content.
Proposed Solution:
Introduce a configuration option in Chainlit's config.toml file that allows developers to enable or disable Markdown and LaTeX rendering specifically for user messages.
This would provide greater control over how user inputs are processed and displayed.
References:
-
Related issue discussing unintended Markdown rendering when user messages start with
#:
https://github.com/Chainlit/chainlit/issues/1951 -
Current documentation on
latexfeature config:
https://docs.chainlit.io/backend/config/features
Additional Context:
Implementing this feature would enhance the flexibility of Chainlit in handling diverse user inputs, ensuring that messages are displayed as intended without unintended formatting.
- #1951
Discusses unintended Markdown rendering when user messages start with
#.
@dosu Any updates on this?
There have not been any updates or new features added specifically for disabling Markdown or LaTeX rendering for user messages in Chainlit since your original request.
Currently, the only relevant configuration is the latex option in the config.toml file, which controls whether mathematical expressions (LaTeX) are rendered in messages. This option is set to false by default to prevent issues with $ characters, but it does not provide granular control for disabling Markdown or LaTeX rendering only for user messages—this setting applies globally to all messages. You can see this reflected in both the documentation and the codebase.
No recent changes or discussions have been found that address the specific feature request to allow separate control over Markdown/LaTeX rendering for user messages only. If you need more fine-grained control, this would still require a new feature or enhancement to be implemented.
To continue talking to Dosu, mention @dosu-bot.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
Doesn't setting latex=false in the config.toml already do this?