Package com.deusto.coffeestack.service
Class ContextoNegocioServiceImpl
java.lang.Object
com.deusto.coffeestack.service.ContextoNegocioServiceImpl
- All Implemented Interfaces:
ContextoNegocioService
Genera un snapshot Markdown con el estado operativo de la cafetería.
El snapshot está pensado para alimentar el contexto de un LLM, por lo que combina dos tipos de secciones:
- Generales (inventario actual, cobertura, caducidades próximas): casi siempre tienen datos y le dan al modelo algo concreto sobre lo que razonar, incluso cuando todo está sano.
- Alertas (reposición urgente, riesgo de faltantes, cobertura crítica): muestran solo lo accionable.
-
Constructor Summary
ConstructorsConstructorDescriptionContextoNegocioServiceImpl(ReposicionService reposicionService, StockService stockService, VentaService ventaService, long ttlSeconds) -
Method Summary
Modifier and TypeMethodDescriptionGenera el snapshot Markdown a inyectar en el system prompt del LLM.
-
Constructor Details
-
ContextoNegocioServiceImpl
@Autowired public ContextoNegocioServiceImpl(ReposicionService reposicionService, StockService stockService, VentaService ventaService, @Value("${ai.chatbot.snapshot-ttl-seconds:300}") long ttlSeconds)
-
-
Method Details
-
generarSnapshot
Description copied from interface:ContextoNegocioServiceGenera el snapshot Markdown a inyectar en el system prompt del LLM.- Specified by:
generarSnapshotin interfaceContextoNegocioService- Returns:
- texto Markdown estructurado con secciones
##por área.
-