feat: 增加RAG知识库与文档基础骨架
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user