Generating apps with ChatGPT
Let’s see what result we get if we ask ChatGPT to generate a weather app. In August 2023, I asked ChatGPT to generate a weather app using GPT-4 with the CodeInterpreter
plugin. I gave it the following prompt:
Write an Angular app that displays real-time weather data from openweathermap.org APIs, using Angular Material, with a user input that accepts city name, country, or postal code as input.
After making a few minor corrections, this is the result I got:
Figure 2.11: ChatGPT weather app – August 2023
ChatGPT created a very simple and straightforward app for me, with a weather-display component using two-way binding for the input field. The service call was correctly implemented in a dedicated weather service triggered by the Fetch Weather button. To achieve similar results to the LocalCast
app we built, we would have to provide a prompt with far more technical details. Non-technical people won’t know...