Spaces:
Sleeping
Sleeping
Upload config.py
Browse files- lexie/config.py +10 -0
lexie/config.py
CHANGED
|
@@ -11,6 +11,13 @@ TOP_K = int(os.getenv("LEXIE_TOP_K", "10"))
|
|
| 11 |
MAX_EVIDENCE_CHARS = int(os.getenv("LEXIE_MAX_EVIDENCE_CHARS", "1000"))
|
| 12 |
POLICIES = ["gdpr", "ai_act"]
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
# Runtime
|
| 15 |
OUTPUT_DIR = BASE_DIR / "runtime" / "outputs"
|
| 16 |
LOG_DIR = BASE_DIR / "runtime" / "logs"
|
|
@@ -25,3 +32,6 @@ def level_from_score(x: int) -> str:
|
|
| 25 |
if x < 33: return "low"
|
| 26 |
if x < 66: return "medium"
|
| 27 |
return "high"
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
MAX_EVIDENCE_CHARS = int(os.getenv("LEXIE_MAX_EVIDENCE_CHARS", "1000"))
|
| 12 |
POLICIES = ["gdpr", "ai_act"]
|
| 13 |
|
| 14 |
+
CHUNK_MAX_TOKENS = 350
|
| 15 |
+
CHUNK_OVERLAP_TOKENS = 60
|
| 16 |
+
CHUNK_MIN_TOKENS = 200
|
| 17 |
+
USER_TEXT_CAP = 16000
|
| 18 |
+
RETRIEVAL_BALANCE = {"gdpr": 0.5, "ai_act": 0.5}
|
| 19 |
+
STRICT_GDPR_PROMPT = True
|
| 20 |
+
|
| 21 |
# Runtime
|
| 22 |
OUTPUT_DIR = BASE_DIR / "runtime" / "outputs"
|
| 23 |
LOG_DIR = BASE_DIR / "runtime" / "logs"
|
|
|
|
| 32 |
if x < 33: return "low"
|
| 33 |
if x < 66: return "medium"
|
| 34 |
return "high"
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
|