🐛 Bug: Fix the o1-mini timeout bug, increase the default timeout to 40 seconds.
Browse files
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",
|
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
|