Skip to content

Commit

Permalink
Increased timeout and max retries
Browse files Browse the repository at this point in the history
  • Loading branch information
VRSEN committed Aug 18, 2024
1 parent c7dc1f5 commit 43b1267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions agency_swarm/util/oai.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def get_openai_client():
if api_key is None:
raise ValueError("OpenAI API key is not set. Please set it using set_openai_key.")
client = openai.OpenAI(api_key=api_key,
timeout=httpx.Timeout(60.0, read=30, connect=5.0),
max_retries=5,
timeout=httpx.Timeout(60.0, read=40, connect=5.0),
max_retries=10,
default_headers={"OpenAI-Beta": "assistants=v2"})
return client

Expand Down

0 comments on commit 43b1267

Please sign in to comment.