Request Timeout for Azure OpenAI when Streaming!

Anonymous
2023-12-20T19:33:59.8533333+00:00

I get lot of Request timeout when streaming. It works well for sometime however suddenly for sometime it will my cloud function will give me timeout since request isn't received during time period. This was working well when I was not streaming.

Example I am talking about the function has limit of 1.5 minutes it stops after that and I get timeout error.
Screenshot 2023-12-20 at 2.41.47 PM

Below is screenshot of Non Streaming almost no errors.

Screenshot 2023-12-20 at 2.41.36 PM

Am I calling client with timeout right in python?

AzureOpenAI(
        api_key=os.getenv("AZURE_OPENAI_KEY_CANADA"),  
        api_version="2023-10-01-preview",
        azure_endpoint="myendpointurl"
        timeout=15.0, max_retries=4
    ),

I also have higher rate limit quota.

Azure OpenAI in Foundry Models

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.