Skip to content

armgit / mem0

Public Imported from GitHub
0

The Memory Layer for AI Agents - Drop-in memory infrastructure for AI agents and apps. Context that persists. Built for production.

[bug] Fix issue of missing user directory on first init (#931)

Deshraj Yadavb314e5e08066
diff --git a/embedchain/pipeline.py b/embedchain/pipeline.py
index ed37a283a..0aacb323e 100644
--- a/embedchain/pipeline.py
+++ b/embedchain/pipeline.py
@@ -64,6 +64,9 @@ class Pipeline(EmbedChain):
:type auto_deploy: bool, optional
:raises Exception: If an error occurs while creating the pipeline
"""
+ # Setup user directory if it doesn't exist already
+ Client.setup_dir()
+
if id and yaml_path:
raise Exception("Cannot provide both id and config. Please provide only one of them.")
@@ -75,22 +78,18 @@ class Pipeline(EmbedChain):
logging.basicConfig(level=log_level, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
self.logger = logging.getLogger(__name__)
-
self.auto_deploy = auto_deploy
-
# Store the yaml config as an attribute to be able to send it
self.yaml_config = None
self.client = None
# pipeline_id from the backend
self.id = None
-
self.chunker = None
if chunker:
self.chunker = ChunkerConfig(**chunker)
self.config = config or PipelineConfig()
self.name = self.config.name
-
self.config.id = self.local_id = str(uuid.uuid4()) if self.config.id is None else self.config.id
if yaml_path:
diff --git a/pyproject.toml b/pyproject.toml
index 67fb9648d..d876fc84e 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,6 +1,6 @@
[tool.poetry]
name = "embedchain"
-version = "0.1.4"
+version = "0.1.5"
description = "Data platform for LLMs - Load, index, retrieve and sync any unstructured data"
authors = [
"Taranjeet Singh <[email protected]>",