stable POC version 1 - chat and topics

This commit is contained in:
Adrien
2026-04-02 21:04:33 +02:00
parent 618e28b354
commit bcc80d250b
74 changed files with 11692 additions and 278 deletions
@@ -10,23 +10,23 @@ import java.util.NoSuchElementException;
@RequestMapping("/api/v1/topics")
public class TopicController {
private final TopicConfigLoader topicConfigLoader;
private final TopicRepository topicRepository;
private final TopicSummaryService topicSummaryService;
public TopicController(TopicConfigLoader topicConfigLoader,
public TopicController(TopicRepository topicRepository,
TopicSummaryService topicSummaryService) {
this.topicConfigLoader = topicConfigLoader;
this.topicRepository = topicRepository;
this.topicSummaryService = topicSummaryService;
}
@GetMapping
public ResponseEntity<List<Topic>> list() {
return ResponseEntity.ok(topicConfigLoader.getAll());
return ResponseEntity.ok(topicRepository.findAll());
}
@PostMapping("/{id}/summary")
public ResponseEntity<TopicSummaryResponse> generateSummary(@PathVariable String id) {
Topic topic = topicConfigLoader.findById(id)
Topic topic = topicRepository.findById(id)
.orElseThrow(() -> new NoSuchElementException("Topic not found."));
TopicSummaryResponse response = topicSummaryService.generateSummary(topic);