Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
6.01k stars 767 forks source link

Custom Elements #948

Open underthesand opened 2 months ago

underthesand commented 2 months ago

Is your feature request related to a problem? Please describe. I would like to create custom elements because the elements provided by Chainlit are too generic and do not align with my company's needs. For example, a custom video player or custom charts using JavaScript libraries.

Describe the solution you'd like A solution similar to a Streamlit component would be ideal. The idea is to be able to inject a React component that could access the Chainlit context (messages, user, etc.). This could lead to the creation of a community store, which would be a great addition to the project.

tpatel commented 2 months ago

Have you tried the unsafe_allow_html feature to display html in messages? Would this solve your problem for now?