Have your say in Community Polls: What was/is your greatest motivation to start your own business?

Why is Open AI returning an empty value today?

Why is Open AI returning an empty value today?

AndrewLeb
Tourist
47 0 2

Open AI returns an empty value today. Yesterday I tested this with the same prompt and parameters, and all was fine. The Max tokens configuration yesterday was the same. Where might the error be?

Screenshot 2023-07-21 175342.pngScreenshot 2023-07-21 175410.pngScreenshot 2023-07-21 175422.png

Replies 4 (4)

paul_n
Shopify Staff
1431 157 332

You have dynamic data in the prompt. It won't always be the same length. Looking at your text, it seems like 1999 might be not enough tokens. You could test the output of that prompt by putting the exact same prompt into an email or something like that and counting the words. Or you could put it into OpenAI's API playground tool to test.  

See also https://help.openai.com/en/articles/4936856-what-are-tokens-and-how-to-count-them

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
AndrewLeb
Tourist
47 0 2

Their parameters are not big. They have around 10-12 words usually. And the token estimator shows that 1230. So 1999 should be well enough.

Screenshot 2023-07-21 224315.png

paul_n
Shopify Staff
1431 157 332

Use a email to output it and double-check with the actual text, not the liquid. Most likely one of your variables is outputting more than you expect. 

Paul_N | Flow Product Manager @ Shopify
- Finding Flow useful? Leave us a review
- Need Flow help? Check out our help docs.
- Building for Flow? Check out Flow's dev docs.
AndrewLeb
Tourist
47 0 2

Yes, this is true, not because of the variables but the prompt itself. With 1 example, it works. But still, this is strange. I have tried the same prompt with the same variables in Zapier, and it returns the value from Open AI. Can this be the Flow limit for sending a prompt to Open AI?