mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-16 09:34:30 -04:00
How to collapse / remove the long output when using Chat Widget #95
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @dentroai on GitHub (Jan 18, 2024).
I'm trying to figure out how to use the chat widget, using the example from the docs: https://python.langchain.com/docs/langserve#chat-widget
Code:
As seen on the screenshot below, when using the langserve playground the
Outputfield always shows all the words from the answer, instead of just a single string. TheStartbutton therefor moves all the way down, and when there's a long answer I need to scroll very long until I can hit theStartbutton again with a new message.I don't want to scroll all the way down to hit
Startagain because of the longOutputfield.Probably it's just some flag or change in the LCEL chain somewhere, but couldn't find the solution for now.
@dentroai commented on GitHub (Jan 23, 2024):
For anyone interested, and my future self, I solved it like this for now:
That way the output below the chat widget only shows the LLM output as a single string instead of displaying every word separately.
Now I don't have to scroll forever anymore, which is nice.