Vitalis_LFM2.5_Cortex.GGUF / src /cognitive /reasoning_engine.py
FerrellSyntheticIntelligence's picture
Upload folder using huggingface_hub
d2a5f5a verified
Raw
History Blame Contribute Delete
655 Bytes
from ..dream_engine.helix_memory import HelixMemory
import numpy as np
class ReasoningEngine:
MODE_MAP = {
"question": "EXECUTION",
"instruction": "RECOVERY",
"explanation": "ANALYTICAL",
"unknown": "EXPLORATORY",
}
def __init__(self, helix_path):
self.helix = HelixMemory(helix_path)
def select_mode(self, hv: np.ndarray) -> str:
prototypes = self.helix.retrieve(hv, top_k=1)
if not prototypes:
return "EXPLORATORY"
proto, meta = prototypes[0]
label = meta.get("label", "unknown")
return self.MODE_MAP.get(label, "EXPLORATORY")