Yes, my same script, after switching to gpt3.5-turbo-16k, keeps getting the below error.
Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 1.0 seconds as it raised APIError: Invalid response object from API: 'Error: stream was reset: CANCEL' (HTTP response code was 500).
Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 2.0 seconds as it raised APIError: Invalid response object from API: 'Error: Request timeout has expired [url=https://api.openai.com/v1/chat/completions, request_timeout=600000 ms]' (HTTP response code was 500).
Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 4.0 seconds as it raised APIError: Bad gateway. {"error":{"code":502,"message":"Bad gateway.","param":null,"type":"cf_bad_gateway"}} 502 {'error': {'code': 502, 'message': 'Bad gateway.', 'param': None, 'type': 'cf_bad_gateway'}} {'alt-svc': 'h3=":443"; ma=86400', 'cache-control': 'private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'cf-ray': '7d9ca44b59c84cc5-SIN', 'date': 'Mon, 19 Jun 2023 15:05:28 GMT', 'expires': 'Thu, 01 Jan 1970 00:00:01 GMT', 'referrer-policy': 'same-origin', 'server': 'istio-envoy', 'x-frame-options': 'SAMEORIGIN', 'content-length': '84', 'content-type': 'application/json; charset=UTF-8', 'x-envoy-upstream-service-time': '300955'}.
Retrying langchain.chat_models.openai.ChatOpenAI.completion_with_retry.<locals>._completion_with_retry in 8.0 seconds as it raised APIError: Bad gateway. {"error":{"code":502,"message":"Bad gateway.","param":null,"type":"cf_bad_gateway"}} 502 {'error': {'code': 502, 'message': 'Bad gateway.', 'param': None, 'type': 'cf_bad_gateway'}} {'alt-svc': 'h3=":443"; ma=86400', 'cache-control': 'private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0', 'cf-ray': '7d9cabbd6eda3f69-SIN', 'date': 'Mon, 19 Jun 2023 15:10:36 GMT', 'expires': 'Thu, 01 Jan 1970 00:00:01 GMT', 'referrer-policy': 'same-origin', 'server': 'istio-envoy', 'x-frame-options': 'SAMEORIGIN', 'content-length': '84', 'content-type': 'application/json; charset=UTF-8', 'x-envoy-upstream-service-time': '304047'}.
And sometimes it can last for hours. please fix this new model endpoint.