Seventh Commit

This commit is contained in:
Mohammad Zwaib
2026-07-10 22:55:00 +02:00
parent 308eeb00af
commit d6153521ca
10 changed files with 47 additions and 43 deletions
@@ -7,26 +7,24 @@ import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.homme.demo.dto.ProcessedWordFileResponseDto;
import com.homme.demo.service.HumbeeService;
@RestController("humbee")
@RestController
@RequestMapping("/knowledge-base")
public class HumbeeController {
@Autowired
private HumbeeService humbeeService;
@GetMapping("/word-links")
public List<ProcessedWordFileResponseDto> getWordLinks() throws Exception {
@GetMapping("/build")
public List<ProcessedWordFileResponseDto> buildKnowledgeBase() throws Exception {
return humbeeService.getWordLinks();
return humbeeService.buildKnowledgeBase();
}
@@ -3,12 +3,10 @@ package com.homme.demo.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.homme.demo.dto.AskResponse;
import com.homme.demo.input.AskRequest;
import com.homme.demo.service.RagService;
@RestController
@@ -19,9 +17,9 @@ public class SearchController {
@PostMapping("/ask")
public AskResponse ask(@RequestBody AskRequest request) {
public AskResponse ask(@RequestParam String question) {
String question = (request == null) ? null : request.getQuestion();
if (question == null || question.isBlank()) {
return AskResponse.builder()