chainlit icon indicating copy to clipboard operation
chainlit copied to clipboard

FEAT : Disabling markdown/latex rendering for user_messages

Open dominpm opened this issue 10 months ago • 4 comments

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:

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.

dominpm avatar Apr 10 '25 08:04 dominpm

  • #1951 Discusses unintended Markdown rendering when user messages start with #.

dominpm avatar Apr 10 '25 08:04 dominpm

@dosu Any updates on this?

dominpm avatar May 26 '25 07:05 dominpm

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

dosubot[bot] avatar May 26 '25 07:05 dosubot[bot]

Doesn't setting latex=false in the config.toml already do this?

hayescode avatar Aug 15 '25 04:08 hayescode