From the course: Getting Hands-On with GPT Models: Tips and Tricks
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Challenge: Auto formatting an API call
From the course: Getting Hands-On with GPT Models: Tips and Tricks
Challenge: Auto formatting an API call
(upbeat music) - [Instructor] So this challenge is a little bit different. We're going to teach you a new concept by challenging you to learn about APIs. As a quick overview, APIs are a way to connect to data sources. Using APIs is a key part of your coding journey, but it could be a little intimidating. So your challenge today is to use GPT to extract information from an API call. Now the API call I've chosen is a weather API. Now to get you started, I provided a sample file that has an API call and some example data. Now your goal with this data is two parts. First, write a prompt that can extract the temperature for 12:00 p.m. Eastern Time and then have GPT-4 generate some JavaScript code that can make the call to the API and print all the temperatures returned. Now if you're struggling with this task, you can always ask ChatGPT for some help. All right, this challenge is a little bit trickier, but I believe in you. Good luck.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.