Chainlit / chainlit

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

Allow disabling/overriding the integrated frontend #705

Open jannisbecker opened 5 months ago

jannisbecker commented 5 months ago

Hey 👋

We're currently building a chainlit backend with a custom react frontend and so far we're very pleased with what chainlit has to offer!

For the sake of simplicity though, we planned to define a static/wildcard route in chainlit's fastapi that simply serves our frontend instead of chainlit's integrated one, however even when we added our own wildcard route, chainlit's integrated one still took priority.

While this usecase may not be as common as deploying a custom frontend separately from the chainlit backend, I think it would be nice to be able to disable the integrated frontend route - either for when it's not used, or like in our case, for when you want to serve your custom one from the same app.

willydouhard commented 5 months ago

Yes, right now the frontend route is always declared last so you won't be able to override it. Labelling this as enhancement request.