When making an API call to GPT, I keep getting the ‘Cannot connect to remote server’ error even when the workflow has been running for less than 300 seconds.
I am trying to determine whether this is a Bubble or OpenAI error. If it’s Bubble, any suggested solutions?
Yeah, that isn’t the issue. It is initialized successfully and always works, except sometimes it says the remote server error after running for 30 - 60 seconds
Are you sure your API call is valid? You’re formatting the message as JSON safe, and providing all of the model, max_tokens, temperature, and n values? Can you send a screenshot of the API call action?
Yes, I am certain. When I run the API call with a simple, short prompt, it returns fine. 90% of the time it us successful. I only get this error when I have a large input and am requesting a large output
you can test it externally in postman to verify if its a problem caused by a Bubble constraint etc, just create a free account at https://www.postman.com/
I did see someone else posting about this issue - Bubble increased the timeout on calls to OpenAI a while back, so it’s 150 seconds. I seem to think they increased it to 5 minutes as well, but I can’t remember and can’t find a source so don’t quote me.
One potential thing you could do is use an intermediary server or service like Make.com, idk what their max timeout is but you can use a service to make the call and then send it back to bubble like a web hook.