[Enhancement]: Add support for rendering Vega-Lite charts in chat responses #12993
CarlaMiquelBlasco
started this conversation in
Feature Requests & Suggestions
Replies: 1 comment 2 replies
|
Some upcoming work will make this more than possible, thanks for the suggestion |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
What features would you like to see added?
It would be great if LibreChat could support rendering Vega-Lite charts directly in chat responses.
Many LLM-generated answers include structured data, summaries, trends, or comparisons that are much easier to understand visually. Vega-Lite is a compact, declarative JSON format for charts, making it well-suited for model-generated visualizations.
More details
Proposed behavior
LibreChat could detect Vega-Lite specs in assistant responses and render them as interactive charts instead of showing only raw JSON.
For example, if a response contains a fenced code block like:
LibreChat would render the chart inline in the conversation.
Suggested fallback behavior
If the chart cannot be rendered, LibreChat should display the original Vega-Lite code block and show a small error message, rather than breaking the chat response.
Additional thought
This could pair nicely with future support for other structured renderers, but Vega-Lite would be a strong starting point because it is widely used, declarative, and easy for LLMs to generate accurately.
Which components are impacted by your request?
No response
Pictures
No response
Code of Conduct
All reactions