fix: 调高时长,更换一处日志

This commit is contained in:
liu.zixi
2025-12-04 19:58:58 +08:00
committed by joshen
parent 73d3c4b7f8
commit 271d52ce70

View File

@@ -206,6 +206,7 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
EventSourceListener listener = new EventSourceListener() {
@Override
public void onOpen(@NotNull EventSource eventSource, @NotNull Response response) {
log.info("调用接口 [{}] 接口开始监听", request.url());
// 检查contentType
String contentType = response.header("Content-Type");
if (contentType == null || !contentType.contains("text/event-stream")) {
@@ -247,7 +248,6 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
eventSource.cancel();
return;
}
log.info("调用接口 [{}] 接口开始监听", request.url());
// 将EventSource存储到Map中以便后续可以中断
conversationEventSourceMap.put(conversationId, eventSource);
}
@@ -365,7 +365,7 @@ public class CaseAiChatServiceImpl implements ICaseAiChatService {
// 8. 执行HTTP请求
OkHttpClient client = new OkHttpClient.Builder()
.connectTimeout(60, TimeUnit.SECONDS)
.connectTimeout(100, TimeUnit.SECONDS)
.writeTimeout(600, TimeUnit.SECONDS)
.readTimeout(600, TimeUnit.SECONDS)
.callTimeout(600, TimeUnit.SECONDS)