codedawakening commited on
Commit
8a2ce1e
·
verified ·
1 Parent(s): 7feabc1

Create config.py

Browse files
Files changed (1) hide show
  1. backend/config.py +44 -0
backend/config.py ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ from dataclasses import dataclass
3
+
4
+ @dataclass
5
+ class Config:
6
+ # Paths
7
+ DATA_DIR = "./data"
8
+ DOCUMENTS_DIR = os.path.join(DATA_DIR, "documents")
9
+ CHROMA_DIR = os.path.join(DATA_DIR, "chroma_db")
10
+ UPLOADS_DIR = os.path.join(DATA_DIR, "uploads")
11
+ LOGS_DIR = "./logs"
12
+
13
+ # Model settings
14
+ EMBEDDING_MODEL = "all-MiniLM-L6-v2"
15
+ CHUNK_SIZE = 1000
16
+ CHUNK_OVERLAP = 200
17
+
18
+ # Vector store settings
19
+ COLLECTION_NAME = "knowledge_base"
20
+ SIMILARITY_TOP_K = 5
21
+
22
+ # IRT settings
23
+ IRT_ENABLED = True
24
+ INITIAL_ABILITY = 0.0
25
+ DIFFICULTY_RANGE = (-3.0, 3.0)
26
+
27
+ # Learning settings
28
+ ADAPTIVE_LEARNING_ENABLED = True
29
+ CONFIDENCE_THRESHOLD = 0.7
30
+
31
+ @classmethod
32
+ def create_directories(cls):
33
+ """Create necessary directories"""
34
+ dirs = [
35
+ cls.DATA_DIR,
36
+ cls.DOCUMENTS_DIR,
37
+ cls.CHROMA_DIR,
38
+ cls.UPLOADS_DIR,
39
+ cls.LOGS_DIR
40
+ ]
41
+
42
+ for directory in dirs:
43
+ os.makedirs(directory, exist_ok=True)
44
+ print(f"📁 Created directory: {directory}")