FerrellSyntheticIntelligence's picture
Update launch.py
06647f3 verified
Raw
History Blame Contribute Delete
3.18 kB
#!/usr/bin/env python3
"""
Vitalis Cortex Hybrid β€” Interactive CLI
Ferrell Synthetic Intelligence
Just run: python launch.py
Then type your questions. Type 'quit' to exit.
"""
import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent))
from src.brain.inference import InferenceEngine
def main():
print("\n" + "=" * 60)
print(" 🧠 VITALIS CORTEX HYBRID v1.0")
print(" Ferrell Synthetic Intelligence")
print("=" * 60)
print("\nBooting architecture...")
engine = InferenceEngine(auto_download=True)
print("\n" + "=" * 60)
print("βœ… ONLINE. Ready for queries.")
print("=" * 60)
print("\nCommands:")
print(" /stats β€” Show session statistics")
print(" /verbose β€” Toggle verbose mode (show pipeline internals)")
print(" /reset β€” Clear memory and start fresh")
print(" /quit β€” Exit")
print("\nJust type your question and press Enter.\n")
verbose = False
while True:
try:
user_input = input("You > ").strip()
if not user_input:
continue
if user_input.lower() in ["/quit", "quit", "exit", "/exit"]:
print("\nShutting down Vitalis Cortex...")
break
if user_input.lower() == "/stats":
stats = engine.get_stats()
print(f"\nπŸ“Š Stats β€” Turns: {stats['turns']} | Memory: {stats['memory_entries']} entries | Attestations: {stats['attestation_history']}")
continue
if user_input.lower() == "/verbose":
verbose = not verbose
print(f"\nVerbose mode: {'ON' if verbose else 'OFF'}")
continue
if user_input.lower() == "/reset":
engine.reset()
print("\nπŸ”„ Memory cleared. Fresh session.")
continue
# Run the full cognitive pipeline
result = engine.think(user_input, verbose=verbose)
response = result["response"]
meta = result["metadata"]
att = result["attestation"]
# Display response
print(f"\nVitalis > {response}")
# Show metadata line
lane_emoji = {"LOGICAL": "🧠", "FACTUAL": "πŸ“š", "CREATIVE": "🎨", "PROCEDURAL": "βš™οΈ"}.get(meta["lane"], "🧠")
att_emoji = "βœ…" if att["passed"] else "⚠️"
print(f" {lane_emoji} {meta['lane']} | {att_emoji} Attestation: {att['confidence']:.2f} | πŸ”„ Turn {meta['turn']} | πŸ’Ύ Memory: {'injected' if meta['memory_injected'] else 'none'}")
# Warn if attestation flagged issues
if att["flagged"]:
print(f" ⚠️ Flagged: {', '.join(att['flagged'])}")
print()
except KeyboardInterrupt:
print("\n\nShutting down...")
break
except Exception as e:
print(f"\n❌ Error: {e}\n")
if __name__ == "__main__":
main()