Mostly working

This commit is contained in:
2026-05-28 00:08:52 -07:00
parent 1cfba3a0ae
commit afa8d17f10
3 changed files with 45 additions and 4 deletions
+5 -2
View File
@@ -215,8 +215,11 @@ class PipelineOrchestrator:
# Persistence: Lore Updates
for lore_update in extraction_result.lore_updates:
await asyncio.to_thread(update_lore, lore_update)
logger.info(f"LLM Worker: Lore updated: {lore_update.entity_name}")
file_path = await asyncio.to_thread(update_lore, lore_update)
await asyncio.to_thread(self.rag_manager.ingest_file, file_path)
logger.info(
f"LLM Worker: Lore updated and ingested into RAG: {lore_update.entity_name}"
)
# Persistence: Character State Updates
for char_update in extraction_result.character_updates:
+16
View File
@@ -87,6 +87,22 @@ class RAGManager:
print(f"Successfully ingested {file_path} into the vector store.")
def ingest_directory(self, dir_path: str):
"""
Recursively loads all markdown files in a directory into the index.
"""
files_processed = 0
for root, _, files in os.walk(dir_path):
for file in files:
if file.endswith(".md"):
file_path = os.path.join(root, file)
self.ingest_file(file_path)
files_processed += 1
print(
f"Successfully ingested {files_processed} files from {dir_path} into the vector store."
)
def summarize_results(self, query: str, nodes: List[Any]) -> List[ContextUpdate]:
"""
Uses an LLM to transform raw snippets into concise "insights", filtering out irrelevant content.