-
Notifications
You must be signed in to change notification settings - Fork 19
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
chat with csv #32
chat with csv #32
Conversation
Demo: https://misty-sunset-6594.ploomberapp.io/ Few points:
while chatGPT is returning:
So right now there is a hardocded plot in the code.
|
use the existing example as a reference: it already uses jupysql and also fixed the plotting problem: https://github.com/ploomber/doc/blob/main/examples/voila/chat-with-csv/notebook.ipynb the code only works with histograms and boxplots but we can improve it later |
I'm using this notebook as reference and just removed the jupysql part. So I need the build the Solara app in a notebook instead of python script right? And what the Ipython widgets components like Upload button etc? All of those need to be converted to Solara components? @edublancas |
yes. you can extract the jupysql + openAI logic from the voila app and then build the components with solara |
Deployed the app here: https://damp-term-2947.ploomberapp.io/ There is an issue with the plotting currently: Solara discourages the use of ![]() |
This looks like a Solara web app embedded in a Voila app? (because when I load it, it shows the Voila spinner)
try asking in Solara's GitHub or Discord. btw, remember to delete applications that you're no longer using. |
Yes I deployed using the Voila option. Can we deploy notebooks in Docker? I thought it's only fpr
yes I've already deleted the ones not needed. |
why not deploy it as a regular solara app? .py file instead of ipynb |
that's what i did previously but we need to use the JupySQL magics right? So I converted it to notebook @edublancas |
ah. yeah, I forgot about the magic details. then, you need to transform the magics into regular python code. https://jupysql.ploomber.io/en/latest/api/python.html many parts of the Python API are undocumented so you'll have to navigate the source code. I think once you get this working, we can document the missing parts of JupySQL's Python API |
ok sure! |
New dashboard: https://holy-voice-3121.ploomberapp.io/ I have converted the notebook to python script. The plot issue is also solved now. @edublancas |
a few things: the app broken when I tried to create a boxplot:
(histogram worked fine). the second time I tried, it didn't crash but it showed a blank plot. the data frame controls doesn't seem to work: also, the last message is deleted when you send a new one, the app should keep the entire history. this looks relevant: https://itnext.io/python-how-to-build-a-chatgpt-interface-in-solara-fd6a1e15ef95 also, I see the SQL command is printed. This is nice but it should be hidden by default (perhaps add toggle control to enable/disabled this) |
I have added the first version of chat interface: https://cool-sun-8688.ploomberapp.io/ There are few glitches like messages occurring multiple times and order is changing. I'll fix these one by one. Some example queries: ![]() ![]() I think the boxplot plot is blank due to this issue: ploomber/jupysql#923
It wasn't working previously because there were only 5 records so there was just 1 page. I have changed it to 30 now. |
sounds good! please request my review when done! |
Chat based interface : https://lively-limit-9311.ploomberapp.io/ The boxplot issue is fixed now. PR: ploomber/jupysql#924 I fixed the bugs that I found (except the ![]() ![]() ![]() Please review. |
general feedback:
|
yes it was that way to allow sending multiple messages. but i think that's not required for our case so I'll remove it.
I just kept it as a placeholder because we had decided to add support for other libraries after we have the basic structure ready. We would need to write logic here to extract only the plotting code because openai returns the entire code script including imports , data loading etc. |
sounds good.
Ok. I think this app has a lot of potential and we can keep them as an ongoing effort (add more features and showcase it in our socials) I think for v1, we can hide this control and limit to jupysql's plotting but in the near future we can work on v2 and expand the plotting capabilities |
solara notebook voila removed files Python app reverted deleted folder Import changed plots chat based lates version zip readme
Address the comments. Please let me know if you find more issues. A couple of things:
|
the top message:
is a bit hard to read I'd suggest:
Found an error:
I think the query was: |
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.
see comment above
Addressed the above comments. |
📚 Documentation preview 📚: https://ploomber-doc--32.org.readthedocs.build/en/32/