chainlit
chainlit copied to clipboard
Enhanced LangGraph Streaming Support & Documentation
trafficstars
Is your feature request related to a problem? Please describe.
- Utilizing LangGraph within Chainlit to stream events and the final response remains difficult and hard for users to implement. Moreover, current implementations appear to significantly decrease the responsiveness of LangGraph agent within the UI.
- #801 Tackled part of the issue and the example implementation is useful, but I wouldn't count that as full support. As mentioned in that thread, I think this is relatively complex.
Describe the solution you'd like
- A similar solution/demo as that provided for by Langroid for integration with Chainlit.
- Tighter support and documentation around how to use
astream_eventsto display events and stream the final response
Describe alternatives you've considered
- There are workshopped solutions and a PR in the cookbook, but they are not easy to find and generally the
cl.LangchainCallbackHandlerdoes not seem to have clean support for streaming. It only streams ifforce_stream_final_answer=True.
Additional context
- Example of speed inconsistency below - my actual
LangGraphperforms fine in a CLI or standalone, but consistently adds significant time when streamed in Chainlit