Просмотр исходного кода

aicall接口请求时长取消限制

lk 2 недель назад
Родитель
Сommit
a06ceab481

+ 3 - 1
fs-company/src/main/java/com/fs/FsCompanyApplication.java

@@ -52,7 +52,9 @@ import org.springframework.transaction.annotation.EnableTransactionManagement;
             // that map to same paths as fs-admin-saas's com.fs.company.controller.chat.* etc.
             "com\\.fs\\.company\\.controller\\.chat\\..*",
             "com\\.fs\\.company\\.controller\\.hisStore\\..*",
-            "com\\.fs\\.company\\.controller\\.transfer\\..*"
+            "com\\.fs\\.company\\.controller\\.transfer\\..*",
+            // Exclude fs-admin-saas his controllers that conflict with fs-company's own controllers
+            "com\\.fs\\.his\\.controller\\.FsRedPacketController"
         })
     }
 )

+ 2 - 9
fs-service/src/main/java/com/fs/fastgptApi/util/HttpUtil.java

@@ -65,15 +65,8 @@ public class HttpUtil {
     }
 
     public static String sendPost(Object param, String url, String key) {
-        // 使用 CloseableHttpClient,设置超时
-        RequestConfig requestConfig = RequestConfig.custom()
-                .setConnectTimeout(30000)       // 连接超时30秒
-                .setSocketTimeout(120000)       // 读取超时120秒(AI响应可能较慢)
-                .setConnectionRequestTimeout(30000)
-                .build();
-        try (CloseableHttpClient httpClient = HttpClients.custom()
-                .setDefaultRequestConfig(requestConfig)
-                .build()) {
+        // 使用 CloseableHttpClient
+        try (CloseableHttpClient httpClient = HttpClients.createDefault()) {
             URIBuilder builder = new URIBuilder(url);
             URI uri = builder.build();