refactor(module-llm):调整 HTTP 请求超时时间

- 将 OkHttpClient 实例的连接、读取和写入超时时间从 30 分钟调整为 3 分钟
- 优化了文件上传过程中的网络请求配置,提高了系统稳定性
This commit is contained in:
Liuyang 2025-02-26 14:57:00 +08:00
parent 2753c27a71
commit 1e25350bbc

View File

@ -395,11 +395,11 @@ public class RagHttpService {
log.info("成功获取文件字节数组,文件大小: {} 字节", fileBytes.length);
// 创建 OkHttpClient 实例
log.info("创建 OkHttpClient 实例,设置超时时间为 30 分钟");
log.info("创建 OkHttpClient 实例,设置超时时间为 3 分钟");
OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(30, TimeUnit.MINUTES)
.readTimeout(30, TimeUnit.MINUTES)
.writeTimeout(30, TimeUnit.MINUTES)
.connectTimeout(3, TimeUnit.MINUTES)
.readTimeout(3, TimeUnit.MINUTES)
.writeTimeout(3, TimeUnit.MINUTES)
.build();
// 创建 MultipartBody