From e6cf18fa4552bedd4d8ee44728f7b38a94ff01db Mon Sep 17 00:00:00 2001 From: luke Date: Mon, 23 Jun 2025 17:05:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0llm=E7=9A=84debug=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../base/infrastructure/util/http/SseOutputAdapter.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/com/knowledge/base/infrastructure/util/http/SseOutputAdapter.java b/src/main/java/com/knowledge/base/infrastructure/util/http/SseOutputAdapter.java index 2bda21f..011ddba 100644 --- a/src/main/java/com/knowledge/base/infrastructure/util/http/SseOutputAdapter.java +++ b/src/main/java/com/knowledge/base/infrastructure/util/http/SseOutputAdapter.java @@ -1,9 +1,11 @@ package com.knowledge.base.infrastructure.util.http; +import lombok.extern.slf4j.Slf4j; import org.springframework.web.servlet.mvc.method.annotation.SseEmitter; import java.io.IOException; +@Slf4j public class SseOutputAdapter implements WriterAdapter { private final SseEmitter emitter; @@ -20,6 +22,7 @@ public class SseOutputAdapter implements WriterAdapter { // 如果 line 以 "data: " 开头,则去除该前缀 if (line.startsWith("data: ")) { + log.debug("[LLM-SSE] line received: {}", line); line = line.substring(6).trim(); }