Request Timeout for Azure OpenAI when Streaming!

aryac 0 Reputation points
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 Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,527 questions
{count} votes

Your answer

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