Skip to content

Commit 2bbac26

Browse files
committed
✨ feat: VectorDb 인코딩 정보 출력 test api - #52
1 parent da1bc62 commit 2bbac26

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/main/java/refresh/acci/domain/vectorDb/presentation/RagController.java

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
import io.swagger.v3.oas.annotations.Operation;
44
import io.swagger.v3.oas.annotations.tags.Tag;
55
import lombok.RequiredArgsConstructor;
6+
import org.springframework.beans.factory.annotation.Qualifier;
7+
import org.springframework.jdbc.core.JdbcTemplate;
68
import org.springframework.security.access.prepost.PreAuthorize;
7-
import org.springframework.web.bind.annotation.PostMapping;
8-
import org.springframework.web.bind.annotation.RequestMapping;
9-
import org.springframework.web.bind.annotation.RequestParam;
10-
import org.springframework.web.bind.annotation.RestController;
9+
import org.springframework.web.bind.annotation.*;
1110
import refresh.acci.domain.vectorDb.application.PdfIndexingService;
1211
import refresh.acci.domain.vectorDb.infra.PgVectorChunkRepository;
1312

@@ -34,4 +33,9 @@ public String index(
3433
pdfIndexingService.indexPdf(Path.of(path), docName, startPage, endPage);
3534
return "done. count=" + repo.countChunks();
3635
}
36+
37+
@GetMapping("/api/v1/rag/debug/pg-encoding")
38+
public String pgEncoding(@Qualifier("vectorDbJdbcTemplate") JdbcTemplate jt) {
39+
return jt.queryForObject("SHOW client_encoding", String.class);
40+
}
3741
}

0 commit comments

Comments
 (0)