FerrellSyntheticIntelligence commited on
Commit ·
b035baa
1
Parent(s): d8d73d9
fix: integrate absolute directory resolution into core memory engine
Browse files- src/core/memory_engine.py +14 -5
src/core/memory_engine.py
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
|
|
|
|
|
| 1 |
class MemoryEngine:
|
| 2 |
-
def
|
| 3 |
-
#
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
class MemoryEngine:
|
| 4 |
+
def ingest_knowledge(self, directory):
|
| 5 |
+
# Anchor the path to the current working directory
|
| 6 |
+
base_path = os.path.join(os.getcwd(), directory)
|
| 7 |
+
|
| 8 |
+
if not os.path.exists(base_path):
|
| 9 |
+
print(f"CRITICAL: Path {base_path} not found. Creating directory...")
|
| 10 |
+
os.makedirs(base_path, exist_ok=True)
|
| 11 |
+
return
|
| 12 |
+
|
| 13 |
+
for filename in os.listdir(base_path):
|
| 14 |
+
print(f"Ingesting: {filename}")
|
| 15 |
+
# Your existing ingestion logic here...
|