Skip to content

Commit 2be3311

Browse files
authored
Update main.go
调整默认请求超时时间
1 parent 5eff5ea commit 2be3311

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,9 @@ func handleRequest(w http.ResponseWriter, r *http.Request) {
5252
}
5353
}
5454

55-
// 默认超时时间设置为60s
55+
// 默认超时时间设置为300s(应对长上下文)
5656
client := &http.Client{
57-
Timeout: 60 * time.Second,
57+
Timeout: 300 * time.Second,
5858
}
5959

6060
// 本地测试通过代理请求 OpenAI 接口

0 commit comments

Comments
 (0)