fix: Enlarge the default retry timeout in ai-proxy (#1640)

This commit is contained in:
Kent Dong
2025-01-03 11:19:40 +08:00
committed by GitHub
parent 00be491d02
commit 187a7b5408
2 changed files with 2 additions and 2 deletions

View File

@@ -94,7 +94,7 @@ custom-setting会遵循如下表格根据`name`和协议来替换对应的字
|------------------|--------|-----------------|-------|-------------| |------------------|--------|-----------------|-------|-------------|
| enabled | bool | 非必填 | false | 是否启用失败请求重试 | | enabled | bool | 非必填 | false | 是否启用失败请求重试 |
| maxRetries | int | 非必填 | 1 | 最大重试次数 | | maxRetries | int | 非必填 | 1 | 最大重试次数 |
| retryTimeout | int | 非必填 | 5000 | 重试超时时间,单位毫秒 | | retryTimeout | int | 非必填 | 30000 | 重试超时时间,单位毫秒 |
### 提供商特有配置 ### 提供商特有配置

View File

@@ -30,7 +30,7 @@ func (r *retryOnFailure) FromJson(json gjson.Result) {
} }
r.retryTimeout = json.Get("retryTimeout").Int() r.retryTimeout = json.Get("retryTimeout").Int()
if r.retryTimeout == 0 { if r.retryTimeout == 0 {
r.retryTimeout = 5000 r.retryTimeout = 30 * 1000
} }
} }