yym68686 commited on
Commit
78ff70d
·
1 Parent(s): aea01d0

🐛 Bug: Fix the o1-mini timeout bug, increase the default timeout to 40 seconds.

Browse files
Files changed (1) hide show
  1. main.py +1 -1
main.py CHANGED
@@ -24,7 +24,7 @@ from urllib.parse import urlparse
24
  async def lifespan(app: FastAPI):
25
  # 启动时的代码
26
  import os
27
- TIMEOUT = float(os.getenv("TIMEOUT", 20))
28
  timeout = httpx.Timeout(connect=15.0, read=TIMEOUT, write=30.0, pool=30.0)
29
  default_headers = {
30
  "User-Agent": "curl/7.68.0", # 模拟 curl 的 User-Agent
 
24
  async def lifespan(app: FastAPI):
25
  # 启动时的代码
26
  import os
27
+ TIMEOUT = float(os.getenv("TIMEOUT", 40))
28
  timeout = httpx.Timeout(connect=15.0, read=TIMEOUT, write=30.0, pool=30.0)
29
  default_headers = {
30
  "User-Agent": "curl/7.68.0", # 模拟 curl 的 User-Agent