diff --git a/embedchain/__init__.py b/embedchain/__init__.py index 14d913f2bd..e71983aebb 100644 --- a/embedchain/__init__.py +++ b/embedchain/__init__.py @@ -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() diff --git a/embedchain/apps/app.py b/embedchain/apps/app.py index 56d1353ead..a89337f07e 100644 --- a/embedchain/apps/app.py +++ b/embedchain/apps/app.py @@ -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 @@ -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( @@ -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) diff --git a/embedchain/pipeline.py b/embedchain/pipeline.py index 00a8a92df8..0cd9038cd8 100644 --- a/embedchain/pipeline.py +++ b/embedchain/pipeline.py @@ -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.") @@ -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) diff --git a/pyproject.toml b/pyproject.toml index f322179edb..9c039de36e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 ",