From the course: Build a JavaScript AI App with React and the OpenAI API

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Ideating with ChatGPT as a base

Ideating with ChatGPT as a base

- [Instructor] Anytime you plan on integrating AI into an existing app or a new app it's a good idea to test out your prompts first in the most bare bones version of the AI. So in this case, because I'm using the open AI API, I'm just going to use Chat GPT to test my prompts. There are two things we need to do in this app. The first one is to transform the prompt into a specific location string. The second one is to take a bunch of weather data and then try to convert that into human readable information. So to start off, let's take a quick look at the API we're going to use. So it's the API from OpenWeather Map and we're going to use two different APIs here. The first one is the Geocoding API which receives the city name, state code, and country code and then outputs a ton of information about the location that you get in return in an array. So in this case, because the request was London you actually get several…

Contents