Skip to content

Commit

Permalink
[Bug fix] Fix issue of missing user directory
Browse files Browse the repository at this point in the history
  • Loading branch information
deshraj committed Nov 24, 2023
1 parent 58f72e1 commit 9b46d2c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 15 deletions.
2 changes: 2 additions & 0 deletions embedchain/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@
from embedchain.client import Client # noqa: F401
from embedchain.pipeline import Pipeline # noqa: F401
from embedchain.vectordb.chroma import ChromaDB # noqa: F401

Client.setup_dir()
9 changes: 1 addition & 8 deletions embedchain/apps/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import yaml

from embedchain.client import Client
from embedchain.config import (AppConfig, BaseEmbedderConfig, BaseLlmConfig,
ChunkerConfig)
from embedchain.config import AppConfig, BaseEmbedderConfig, BaseLlmConfig, ChunkerConfig
from embedchain.config.vectordb.base import BaseVectorDbConfig
from embedchain.embedchain import EmbedChain
from embedchain.embedder.base import BaseEmbedder
Expand Down Expand Up @@ -68,9 +67,6 @@ def __init__(
:type system_prompt: Optional[str], optional
:raises TypeError: LLM, database or embedder or their config is not a valid class instance.
"""
# Setup user directory if it doesn't exist already
Client.setup_dir()

# Type check configs
if config and not isinstance(config, AppConfig):
raise TypeError(
Expand Down Expand Up @@ -134,9 +130,6 @@ def from_config(cls, yaml_path: str):
:return: An instance of the App class.
:rtype: App
"""
# Setup user directory if it doesn't exist already
Client.setup_dir()

with open(yaml_path, "r") as file:
config_data = yaml.safe_load(file)

Expand Down
6 changes: 0 additions & 6 deletions embedchain/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,6 @@ def __init__(
: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.")

Expand Down Expand Up @@ -357,9 +354,6 @@ def from_config(cls, yaml_path: str, auto_deploy: bool = False):
:return: An instance of the Pipeline class.
:rtype: Pipeline
"""
# Setup user directory if it doesn't exist already
Client.setup_dir()

with open(yaml_path, "r") as file:
config_data = yaml.safe_load(file)

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "embedchain"
version = "0.1.20"
version = "0.1.21"
description = "Data platform for LLMs - Load, index, retrieve and sync any unstructured data"
authors = [
"Taranjeet Singh <[email protected]>",
Expand Down

0 comments on commit 9b46d2c

Please sign in to comment.