File size: 1,914 Bytes
1605cbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
"""
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",
]