Class ChatbotController
java.lang.Object
com.deusto.coffeestack.controller.ChatbotController
Endpoint del asistente IA conversacional. Responde a preguntas operativas
de la cafetería usando el snapshot de KPIs como contexto.
Acceso restringido a PROPIETARIO y ROOT: las decisiones sobre compras, márgenes y rotación están vinculadas al rol de gestión.
-
Constructor Summary
ConstructorsConstructorDescriptionChatbotController(ChatbotService chatbotService, ContextoNegocioService contextoNegocioService) -
Method Summary
Modifier and TypeMethodDescriptionpreguntar(@Valid PreguntaChatbotRequest request) snapshot()Devuelve, en texto plano, el snapshot exacto que el asistente recibe como contexto en cada pregunta.
-
Constructor Details
-
ChatbotController
public ChatbotController(ChatbotService chatbotService, ContextoNegocioService contextoNegocioService)
-
-
Method Details
-
preguntar
@PostMapping("/preguntar") @PreAuthorize("hasAnyRole(\'PROPIETARIO\', \'ROOT\')") public RespuestaChatbotResponse preguntar(@Valid @RequestBody @Valid PreguntaChatbotRequest request) -
snapshot
@GetMapping(value="/snapshot", produces="text/plain") @PreAuthorize("hasAnyRole(\'PROPIETARIO\', \'ROOT\')") public String snapshot()Devuelve, en texto plano, el snapshot exacto que el asistente recibe como contexto en cada pregunta. Útil para depurar el prompt y entender por qué el modelo responde como lo hace.
-