#API/script not working in Webflow.

32 messages · Page 1 of 1 (latest)

glass kernel
#

Hello! I'm creating a website with Webflow that uses GPT-3 davincci to convert my text into a professional looking email.
Nothing happens when I run it. I looked in the console and I got two error messages.

fading sun
#

Can you expand the first error to see more details?

#

The one starting with POST

glass kernel
#

here is the script btw

fading sun
#

It looks like webflow is not sending the key over properly in the request

glass kernel
#

I have entered a valid API_KEY. I just didn't show it in the script that I sent a screenshot of

glass kernel
fading sun
#

Im not too sure either because that looks right to me the way you’re sending Authorization header, double check the format

#

Oh acgually

#

This looks like an old endpoint

#

There’s no “engines” anymore

glass kernel
#

oh okay

fading sun
#

You pass text-davinci-003 in a model param

glass kernel
#

but will that chose the right model then? davinci-003?

fading sun
glass kernel
#

lite this:

#

?

fading sun
#

Yeah

glass kernel
#

wow

#

it worked. But something is weird.

#

I get message displayed back from GPT as a response to my message rather then creating an email for me with the message that I gave it.

#

My goal is to give it text-information, like "the delivery is late. It will arrive on sunday". Then let GPT take that information and turn it into a professional looking email.

#

Like this:

#

So I edited the script like this

#

which made it work