添加llm的debug日志

This commit is contained in:
luke 2025-06-23 17:05:04 +08:00
parent 2cd64981a1
commit e6cf18fa45

View File

@ -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();
}