LG-Experiment / Scripts

218 stars 99 forks source link

undefined is not an object (evaluating 'json.choices[0]') #9

Open frewdr opened 1 year ago

frewdr commented 1 year ago

I have downloaded the XelPlus ASK AI in EXCEL.xlsx file, and copied the ts script into the Code Editor. I have replaced the Initial "button" with a new button linked to the Open AI in Excel script. I have established an API, and have copied it to cell B1 on the "API" tab. I have entered "Who won the 1985 World Series?" into cell B2 on the "Prompt" tab. When I run the code, I get the error "undefined is not an object (evaluating 'json.choices[0]'). I have added a console.log statement to write out json() following the "await response.json()" statement. The output appears to be blank.

ZQueue commented 1 year ago

Check that you actually have enough credits. The free credit that you get expires pretty quickly so you may not have any credit left.

KenB1956 commented 1 year ago

I have the same issue and have a paid account.

bahattab commented 1 year ago

Line 46: Cannot read properties of undefined (reading '0')

it is better to make the complete file and make a complete video to set up the file.

manofprogramme commented 9 months ago

how to Fix the Error / issue

sohagdev commented 9 months ago

Did anyone find the solution to this problem?