[Bug fix] Fix issue of missing user directory (#975)

This commit is contained in:
Deshraj Yadav
2023-11-24 09:26:59 -08:00
committed by GitHub
parent 58f72e1ffe
commit 1df46b2bb3
6 changed files with 14 additions and 19 deletions

View File

@@ -2,9 +2,7 @@ from typing import Optional
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 +66,6 @@ class App(EmbedChain):
: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 +129,6 @@ class App(EmbedChain):
: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)