Skip to content

Python scraper based on AI

add default folder for the cache

Marco Vinciguerra543b48764a29
diff --git a/scrapegraphai/nodes/rag_node.py b/scrapegraphai/nodes/rag_node.py
index 9c4dc164..23e7cbb8 100644
--- a/scrapegraphai/nodes/rag_node.py
+++ b/scrapegraphai/nodes/rag_node.py
@@ -99,7 +99,7 @@ class RAGNode(BaseNode):
)
embeddings = self.embedder_model
- folder_name = "cache"
+ folder_name = self.node_config.get("cache", "cache")
if self.node_config.get("cache", False) and not os.path.exists(folder_name):
index = FAISS.from_documents(chunked_docs, embeddings)