ferrislucas / promptr

Promptr is a CLI tool that lets you use plain English to instruct GPT3 or GPT4 to make changes to your codebase.
MIT License
902 stars 37 forks source link

Gateway timeout #32

Closed bhaskoro-muthohar closed 1 year ago

bhaskoro-muthohar commented 1 year ago

Is there any way to fix the gateway timeout error?

  data: {
      error: {
        code: 524,
        message: 'Gateway timeout.',
        param: null,
        type: 'cf_gateway_timeout'
      }
    }
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
ferrislucas commented 1 year ago

Hi, I’ve seen this happen with GPT4. I’m curious what model you were using?

I think if the prompt is over some complexity threshold then the model either gets “confused” or just takes too long causing the OpenAI API gateway to abort the request. I’m guessing about this.

I’ve found that when I make the prompt more concise then the timeout is usually fixed. I have no idea what’s happening of course, but I recommend trying to shorten or somehow make your prompt less confusing when this happens.