Rohan03 commited on
Commit
da8f259
·
verified ·
1 Parent(s): a1382fa

Fix Issue 3: Add 60s default timeout to OpenAI-compatible backend

Browse files
Files changed (1) hide show
  1. patches/llm_backend_timeout.patch +13 -0
patches/llm_backend_timeout.patch ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ --- a/purpose_agent/llm_backend.py
2
+ +++ b/purpose_agent/llm_backend.py
3
+ @@ -199,7 +199,7 @@
4
+ ):
5
+ from openai import OpenAI
6
+
7
+ self.model = model
8
+ self.client = OpenAI(
9
+ base_url=base_url,
10
+ - api_key=api_key or os.environ.get("OPENAI_API_KEY"),
11
+ + api_key=api_key or os.environ.get("OPENAI_API_KEY"),
12
+ + timeout=60.0,
13
+ )