-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AskUploadButton renders as "0" due to isAsk sometimes being zero #1548
Comments
…make sure isRunning & isAsk are always booleans. Possible fix for Chainlit#1548
I agree on explicit vs. implicit (and you're probably right about the SQLAlchemy part - there's more than a few things to be improved there). Would you please be so kind as to shoot a PR with 0786e17? |
…make sure isRunning & isAsk are always booleans. Possible fix for Chainlit#1548
@dokterbob there you go. |
Should be fixed in the latest release! |
Describe the bug
With chat history using SQLAlchemy data layer with SQLite, the UI becomes like this (see the zeros):
This is because Message.tsx renders following into zero when isAsk is zero and isRunning is falsy:
That zero value originates from SQLAlchemy layer implementation. Perhaps there should be casting to boolean there.
In my humble opinion, the above UI logic is not optimal either, as evidenced by this issue. There's nothing wrong with preferring readability and simplicity over cleverness and reliance on what could be here considered a side effect.
To Reproduce
Implement chat history with SQLAlchemy & SQLite.
The text was updated successfully, but these errors were encountered: