Working with code on canvas
In Chapter 4, we mentioned the new ChatGPT canvas feature, which allows users to dynamically modify the model’s response in a collaborative workspace. However, when it comes to code development, this feature really shines.
In fact, it provides an environment for code development, execution, and debugging.
Let’s see an example. We will start with a simple query to ChatGPT:

Figure 5.23: Generating code with ChatGPT
As expected, ChatGPT was able to generate the required code. Now, if we click on the Edit icon, we will be able to access the canvas workspace, where we can:
- Modify the code:

Figure 5.24: Modifying code with the canvas workspace
- Run the code and see the results in a console:

Figure 5.25: Seamlessly testing and modifying code
This is a game-changer for software development; it means having the possibility to seamlessly test and execute code while interacting...