-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

Practical Generative AI with ChatGPT
By :

The primary capability you should leverage is ChatGPT code generation. How many times have you looked for a pre-built piece of code to start from? Or looked for code that could generate functions, sample datasets, SQL schemas, and so on? ChatGPT is able to generate code based on input in natural language:
Figure 5.1: Example of ChatGPT generating a Python function to write into CSV files
As you can see, not only was ChatGPT able to generate the function but it was also able to explain what the function does, how to use it, and what to substitute in generic placeholders such as my_folder
.
Now let’s raise the difficulty bar. If ChatGPT is capable of generating a Python function, could it generate an entire video game as well? Let’s try. What I want to do is provide ChatGPT with an illustration of the type of game I want to develop and ask it to replicate it with code. The following is an illustration of my desired...