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

This commit is contained in:
Deshraj Yadav
2023-11-09 22:29:41 -08:00
committed by GitHub
parent 17129e2eaa
commit b314e5e080
2 changed files with 4 additions and 5 deletions

View File

@@ -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:

View File

@@ -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 <taranjeet@embedchain.ai>",