Uses the browser built-in fetch API to make a request to GPT3. Make sure you get an API key from OpenAI to run this code properly.
fetch
This example was written with the assistance of ChatGPT with GPT4.