irudnyts/openai

Timeout was reached: [api.openai.com] Failed to connect to api.openai.com port 443

Eos-halo opened this issue · 4 comments

res <- gptcelltype(markers, model = 'gpt-4')
[1] "Note: OpenAI API key found: returning the cell type annotations."
Error in curl::curl_fetch_memory(url, handle = handle) :
Timeout was reached: [api.openai.com] Failed to connect to api.openai.com port 443 after 10002 ms: Timeout was reached

Can anyone help me to solve the problem? Thanks a lot!

hello,i got the same problem, would you find find the solution? thanks a lot

same as in #42 , It happens to me using gpt-4/-turbo models only... and quite always. For the moment, I have solved using Python library through {reticulate}... (I was not able to solve the issue trying any package or any direct call to curl endpoint, even tuning various timeouts settings... I decide it is an issue with R, or a preference on official python libraries from openai's server side...)

same as in #42 , It happens to me using gpt-4/-turbo models only... and quite always. For the moment, I have solved using Python library through {reticulate}... (I was not able to solve the issue trying any package or any direct call to curl endpoint, even tuning various timeouts settings... I decide it is an issue with R, or a preference on official python libraries from openai's server side...)

Hi, bro. May I know how you connect it to Python? I also cannot solve this issue...

@Chen0907-colson, you can find my solution switching to Python here (which require a configured system, I assured by https://github.com/CorradoLanera/gpteasyr/blob/main/R/setup_py.R).

Anywhay, I have found a possible solution (@irudnyts) using connecttimeout_ms (as implemented here, which solved the same issue I had for file upload).