New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better input/output visibility in Langchain callback #7478
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution @pokidyshev!
Code-wise this LGTM, but I'll defer to our product team as to whether we want to make this change (CC @sfc-gh-jcarroll)
Thanks for the contribution! I don't think we should change the default behavior for all usage (which this seems to do) If it only modified the input behavior if the input_str was longer than if input_str > MAX_TOOL_INPUT_STR_LENGTH:
self._container.markdown(f"**Input:**\n\n{input_str}")
self._container.divider() And then don't modify the output If you want to push an app with the change so we can play around with it (or record a quick video) that would help too with deciding whether to accept this. BTW If you just want this for your own uses, I believe you can easily just take the file, make your changes and import / use it in your own app. It should be fairly standalone and stable at this point. |
Hello @sfc-gh-jcarroll, Thank you for your valuable suggestions! I have updated the code accordingly. Regarding the |
Here is a Loom showcasing this feature: https://www.loom.com/share/3eb5ffac5c914377b2eca7351705599d?sid=7d75337a-8843-4aeb-9783-d4c8b6859ff7 |
This looks great. The way you implemented it makes sense and I'm fine with that approach instead of the divider. The Loom is very helpful too, thanks for putting it together 😄 @vdonato good by me to approve and merge |
Thanks again @pokidyshev! |
* Better input/output visibility in Langchain callback * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py
* Better input/output visibility in Langchain callback * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py
* Better input/output visibility in Langchain callback * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py * Update streamlit_callback_handler.py
Show long inputs under the cut: