feat: 增加RAG知识库与文档基础骨架

This commit is contained in:
2026-05-18 22:32:53 +08:00
parent 18386fde63
commit 4a20a25282
15 changed files with 360 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
package com.bruce.rag.controller;
import com.bruce.rag.entity.RagDocument;
import com.bruce.rag.service.IRagDocumentService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
@Tag(name = "RAG知识库文档管理")
@RestController
@RequestMapping("/api/rag/documents")
public class RagDocumentController {
private final IRagDocumentService ragDocumentService;
public RagDocumentController(IRagDocumentService ragDocumentService) {
this.ragDocumentService = ragDocumentService;
}
@Operation(summary = "查询全部知识库文档")
@GetMapping
public List<RagDocument> list() {
return ragDocumentService.list();
}
}