1
2
3
4
5
6
7
8
9
10
11
12
13
14
| @RestController
class AiController(
private val basicAiService: BasicAiService,
) {
@PostMapping("/generation/autoconfigured")
fun generationWithAutoconfigured(
@RequestBody question: Question,
): Answer = basicAiService.generationWithAutoconfigured(question.text).toAnswer()
@PostMapping("/generation/programmatically")
fun generationWithProgrammatically(
@RequestBody question: Question,
): Answer = basicAiService.generationWithProgrammatically(question.text).toAnswer()
}
|