raviix46 commited on
Commit
d0d4aae
·
verified ·
1 Parent(s): 5100de3

Delete rag_config.py

Browse files
Files changed (1) hide show
  1. rag_config.py +0 -29
rag_config.py DELETED
@@ -1,29 +0,0 @@
1
- from pathlib import Path
2
- import json
3
-
4
- ROOT_DIR = Path(__file__).resolve().parent
5
- DATA_DIR = ROOT_DIR / "data"
6
-
7
- CHUNKS_PATH = DATA_DIR / "chunks.jsonl"
8
- THREADS_PATH = DATA_DIR / "threads.json"
9
- MESSAGES_PATH = DATA_DIR / "messages.json"
10
- EMBEDDINGS_PATH = DATA_DIR / "embeddings.npy"
11
- CHUNK_IDS_PATH = DATA_DIR / "chunk_ids.json"
12
-
13
- RUNS_DIR = ROOT_DIR / "runs"
14
-
15
-
16
- def load_json(path: Path):
17
- with path.open("r", encoding="utf-8") as f:
18
- return json.load(f)
19
-
20
-
21
- def load_jsonl(path: Path):
22
- items = []
23
- with path.open("r", encoding="utf-8") as f:
24
- for line in f:
25
- line = line.strip()
26
- if not line:
27
- continue
28
- items.append(json.loads(line))
29
- return items