The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.
Python agentic-memoryagentic-memory-systemagentsaiai-agentschatgptgenaillmlong-term-memorymemorymemory-managementpythonragstate-management
Fix: lazy load Notion loader (#419)
Taranjeet Singhc96df72cd09e
diff --git a/embedchain/data_formatter/data_formatter.py b/embedchain/data_formatter/data_formatter.pyindex f478ca554..f88348280 100644--- a/embedchain/data_formatter/data_formatter.py+++ b/embedchain/data_formatter/data_formatter.py@@ -11,7 +11,6 @@ from embedchain.loaders.docs_site_loader import DocsSiteLoaderfrom embedchain.loaders.docx_file import DocxFileLoaderfrom embedchain.loaders.local_qna_pair import LocalQnaPairLoaderfrom embedchain.loaders.local_text import LocalTextLoader-from embedchain.loaders.notion import NotionLoaderfrom embedchain.loaders.pdf_file import PdfFileLoaderfrom embedchain.loaders.sitemap import SitemapLoaderfrom embedchain.loaders.web_page import WebPageLoader@@ -46,10 +45,16 @@ class DataFormatter:"docx": DocxFileLoader(),"sitemap": SitemapLoader(),"docs_site": DocsSiteLoader(),- "notion": NotionLoader(),}+ lazy_loaders = ("notion", )if data_type in loaders:return loaders[data_type]+ elif data_type in lazy_loaders:+ if data_type == "notion":+ from embedchain.loaders.notion import NotionLoader+ return NotionLoader()+ else:+ raise ValueError(f"Unsupported data type: {data_type}")else:raise ValueError(f"Unsupported data type: {data_type}")