OpenAI Create a Completion Module returning empty exectuion, no result

Anyone know why this is happening? It seems to happen at random, and it doesnt give any errors, just passes an empty variable, no result, didnt even ask ai for a structured output, just plain text. it worked before just fine, but occasionally just returns nothing while STILL consuming MAX tokens or tleast thats what the completion data says.

I have made sure it is receiving input correctly, but like i said it has worked just fine before with the same exact setup, but randomly fails, and it doesn’t give an error and just passes an empty variable to the next AI steps, which causes incorrect outputs from the flow.

Hi @Denis_V,

It sounds like this random issue is happening because the max token limit is set lower than the content being generated. In simple terms, the reply isn’t being fully generated because the token limit is reached before the AI can finish.

Solution:

  1. Try removing or increasing the max token limit.
  2. Update the OpenAI model or switch to a model with a higher token capacity.

This should help resolve the issue.
Let me know how it goes! If this helps, please consider marking it as a solution. :+1: