-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.py
More file actions
25 lines (17 loc) · 719 Bytes
/
Copy pathconfig.py
File metadata and controls
25 lines (17 loc) · 719 Bytes
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
import os
from dotenv import load_dotenv
load_dotenv()
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
DATA_DIR = os.path.join(BASE_DIR, "data")
UPLOAD_DIR = os.path.join(DATA_DIR, "uploads")
INDEX_DIR = os.path.join(DATA_DIR, "llamaindex")
os.makedirs(UPLOAD_DIR, exist_ok=True)
os.makedirs(INDEX_DIR, exist_ok=True)
EMBED_MODEL = "BAAI/bge-base-en-v1.5"
TOP_K = 5 # Reduced from 5 for faster retrieval
# Large file handling settings
BATCH_SIZE = 1000 # Process nodes in batches for large files
MAX_FILE_SIZE_MB = 100 # Warn for files larger than this
CHUNK_SIZE = 256 # Optimized for speed and large files
CHUNK_OVERLAP = 25 # Reduced overlap for efficiency
GROQ_API_KEY = os.getenv("GROQ_API_KEY")