You can launch a short introduction to CoCalc’s support for ChatGPT by clicking the blue Tour button at upper right in the ChatGPT dialog box whenever you open ChatGPT in CoCalc. This is one of several Tours of features in CoCalc.
CoCalc makes three different versions of ChatGPT available. The options are displayed whenever you ask ChatGPT something. Here is an example showing the choices when ChatGPT is asked to Explain a code block in a Jupyter notebook:
The first option is OpenAI’s fastest model, GPT-3.5 with 4k token context. It is offered in CoCalc free of charge and sufficient for most everyday tasks.
GPT-4 is OpenAI’s most capable model, great for tasks that require creativity and advanced reasoning (8k token context). GPT4 is generally considerably slower than either of the GPT-3.5 options.
Have you ever been using a Jupyter notebook and got an error message? You can now click a button and ChatGPT will automatically try to figure out how to fix the error and tell you in a chat next to your main document.
It is often helpful to chat back and forth with ChatGPT in Side Chat to refine the initial answer. Use the “Reply” button in side chat to ask follow-up questions.
ChatGPT can help you understand and fix execution errors in a Jupyter notebook code cell.
For programming language file types such as .py, .R, pl, and .c, the CoCalc Frame Editor includes ChatGPT buttons in the top menu. ChatGPT editor support actually works for hundreds of file types (basically everything that exists), including LaTeX (“.tex”) and R markdown (“.rmd”).
Open a .py file in CoCalc.
Notice there’s a ChatGPT button in the top menu bar.
ChatGPT in combination with the Linux terminal is extremely powerful, because ChatGPT can help you write a script for any command that can be invoked from the command shell. See the next subsections for example.
Linux Terminal windows include a ChatGPT button at the top.
You can get help with basic shell scripting as well as with advanced CoCalc commands.
Sample requests:
replace ‘x’ by ‘y’ in all files
how can I use pari/gp to compute the number of primes up to 2023
count the total number of lines of code in all coffeescript files under git in all subdirectories then follow-up with: can you exclude counting blank lines and comments?
I am using psql to query a table with a column called “time”. I would like to make a table showing the number of entries in my table for each of the last 7 days.
You can ask a question at the start of your CoCalc session. ChatGPT help boxes are at the top of the sign-in page and all feature headings (landing pages).