-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.example.py
More file actions
67 lines (54 loc) · 1.6 KB
/
Copy pathconfig.example.py
File metadata and controls
67 lines (54 loc) · 1.6 KB
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
59
60
61
62
63
64
65
66
67
"""
Configuration template for Writ projects.
Rename to config.py and customize for your domain.
"""
import os
from pathlib import Path
from dotenv import load_dotenv
load_dotenv()
PROJECT_ROOT = Path(__file__).parent
RESOURCES_DIR = PROJECT_ROOT / "resources"
DATA_DIR = PROJECT_ROOT / "data"
LOGS_DIR = PROJECT_ROOT / "logs"
def ensure_dirs():
"""Create project directories if they don't exist."""
DATA_DIR.mkdir(exist_ok=True)
LOGS_DIR.mkdir(exist_ok=True)
# Database
NEO4J_URI = os.getenv("NEO4J_URI", None)
NEO4J_USER = os.getenv("NEO4J_USER", "neo4j")
NEO4J_PASSWORD = os.getenv("NEO4J_PASSWORD", None)
# Document processing
LLAMA_CLOUD_API_KEY = os.getenv("LLAMA_CLOUD_API_KEY")
CHUNK_SIZE = 1000
CHUNK_OVERLAP = 200
# AI
OPENAI_API_KEY = os.getenv("OPENAI_API_KEY")
NLP_MODE = os.getenv("NLP_MODE", "auto").lower() # auto | openai | langchain | basic
# CORS / API
ALLOWED_ORIGIN = os.getenv("ALLOWED_ORIGIN", "*")
DEBUG = os.getenv("DEBUG", "true").lower() == "true"
# ---------------------------------------------------------------------------
# DOMAIN-SPECIFIC: Customize entity and relationship types for your regulation
# ---------------------------------------------------------------------------
# See schema.example.yaml for full schema; these are used by ingestion/query.
ENTITY_TYPES = [
"Regulation",
"Requirement",
"Procedure",
"Personnel",
"Control",
"Timeline",
"Document",
"Location",
]
RELATIONSHIP_TYPES = [
"REQUIRES",
"APPLIES_TO",
"IMPLEMENTS",
"HAS_DEADLINE",
"MENTIONED_IN",
"REFERENCES",
"PERFORMED_BY",
"SUPERSEDES",
]