""" FALSIFY — Belief Revision Research Copilot Exposes core models and edge constants for the belief graph. Import-time environment safety ------------------------------ FALSIFY is a single-user, self-hosted demo. We set a few Cognee defaults *before* any Cognee module is imported (importing :mod:`falsify.models` pulls in Cognee), so that graph writes go into one shared local graph without per-user access-control gymnastics. ``setdefault`` means an explicitly-exported env var always wins. """ import os as _os # Single-user mode: shared local DBs, auth off. Must precede the first cognee import. _os.environ.setdefault("ENABLE_BACKEND_ACCESS_CONTROL", "False") # Keep logs quiet unless the user opts in. _os.environ.setdefault("LOG_LEVEL", "ERROR") _os.environ.setdefault("COGNEE_LOG_FILE", "false") # Enable the session cache so remember(session_id=...) / improve() work (cross-session proof). _os.environ.setdefault("CACHING", "true") _os.environ.setdefault("CACHE_BACKEND", "fs") # Default embeddings to fastembed — a fully local, CPU-only, zero-cost embedder, so # the whole pipeline (and `python main.py --demo`) runs with NO external API key. # Any explicit EMBEDDING_* in the environment / .env overrides these (setdefault). _os.environ.setdefault("EMBEDDING_PROVIDER", "fastembed") _os.environ.setdefault("EMBEDDING_MODEL", "BAAI/bge-small-en-v1.5") _os.environ.setdefault("EMBEDDING_DIMENSIONS", "384") _os.environ.setdefault("EMBEDDING_MAX_TOKENS", "512") from falsify.models import ( Assertion, Conclusion, Evidence, Hypothesis, InvestigationQuestion, TruthState, # Edge relationship constants CONTRADICTS, DEPENDS_ON, SUPPORTS, SUPERSEDES, ) __all__ = [ "TruthState", "InvestigationQuestion", "Hypothesis", "Evidence", "Conclusion", "Assertion", "DEPENDS_ON", "SUPPORTS", "CONTRADICTS", "SUPERSEDES", ]