mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 17:36:47 +08:00
fix: 调高时长,更换一处日志
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user