jcubic/chat-gpt

saving the python generated code in a 'code interpreter session'.

ffs-unifesp opened this issue · 14 comments

Hi,
Congrats on the code!
Would it be possible to save both the python generated code and the results of its running together in the chat history?

Regards,

jcubic commented

Sorry, I don't have access to chatGPT plus so I can't run Code Interpreter. But you can contribute if you want.

jcubic commented

You can try to download the HTML but I'm not sure if it will work.

Last time I've checked to see the output I needed to disable JavaScript but then the scrollbar was not working. Not sure if you can download the real live HTML. ChatGPT is a web app. Maybe try to install some extensions to your browser.

jcubic commented

The code interpreter output is saving now, I've also added an example of its workings.

If the bookmark doesn't work for you, please provide the prompt which is not working.

Amazing!!!!
Two minor suggestions that could enhance this fabulous script:

1- Expand All Code Before Saving: In code interpreter sessions, several code snippets are generated. It would be more user-friendly if all the code sections were expanded by default, removing the need for users to click on "Show Work" for each segment.
2-Save Execution Results: It would be beneficial to not only save the generated code but also the results of each code's execution. This would provide a more comprehensive view of the session, aiding in understanding and reference.

Thanks a lot!!!

jcubic commented

I don't know how to use Code Interpreter to show the expandable Code and what are the output.
Please provide the prompt and maybe a screenshot of how it will look so I will make sure that I have the same output.

Hi... here is the screenshot ...
Untitled

jcubic commented

It doesn't work this is what I've got:

Przechwycenie obrazu ekranu_2023-08-18_19-15-00

Please write everything you put into the chatGPT not only part of it taken out of context.

Hi! Try to do the following: open the gpt4, select code interpreter, upload any CSV file, and ask for some analysis.
Please, see attached both the screenshot and the HTML saved by your script.

Screenshot 2023-08-18 at 15 02 41
jcubic commented

ok, it should now save the Python code. I will also add an example for the Python snippets.

jcubic commented

It's already done, it expands and saves everything look at this example:

https://jcubic.github.io/chat-gpt/2023-08-18/chat-gpt-currency-analysis-symbols-distribution.html

jcubic commented

Let me know if something is not working properly.

PERFECT!! AMAZING!! Thank you a lot for adding both of the features!!!