Create a new Apps Script in your spreadsheet (extensions > Apps Script) and paste in this code. Click the run button to authorise it. It will fail this first time, but that's fine, it just needs inputs from the spreadsheet to run.
You will now see =GPT and =DALLE functions in cells!
Best of luck!