Class InferenceInitializer
java.lang.Object
ai.chatur.cortex.spring.inference.InferenceInitializer
Computes inference once the application is ready, so that queries against a freshly started —
possibly persistent — knowledge graph see inferred statements without waiting for the first
branch approval.
-
Constructor Summary
ConstructorsConstructorDescriptionInferenceInitializer(ai.chatur.cortex.CortexInference cortex) Creates the initializer. -
Method Summary
Modifier and TypeMethodDescriptionvoidRecomputes inference over the approved assertions.
-
Constructor Details
-
InferenceInitializer
public InferenceInitializer(ai.chatur.cortex.CortexInference cortex) Creates the initializer.- Parameters:
cortex- the inference role used to recompute inference
-
-
Method Details
-
initializeInference
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void initializeInference()Recomputes inference over the approved assertions. Runs once, onApplicationReadyEvent; failures are logged rather than rethrown, since a failure here must not prevent the application from starting.
-