[Bug fix] missing dir on first init for App (#934)
This commit is contained in:
@@ -2,8 +2,8 @@ from typing import Optional
|
|||||||
|
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from embedchain.config import (AppConfig, BaseEmbedderConfig, BaseLlmConfig,
|
from embedchain.client import Client
|
||||||
ChunkerConfig)
|
from embedchain.config import AppConfig, BaseEmbedderConfig, BaseLlmConfig, ChunkerConfig
|
||||||
from embedchain.config.vectordb.base import BaseVectorDbConfig
|
from embedchain.config.vectordb.base import BaseVectorDbConfig
|
||||||
from embedchain.embedchain import EmbedChain
|
from embedchain.embedchain import EmbedChain
|
||||||
from embedchain.embedder.base import BaseEmbedder
|
from embedchain.embedder.base import BaseEmbedder
|
||||||
@@ -67,6 +67,9 @@ class App(EmbedChain):
|
|||||||
:type system_prompt: Optional[str], optional
|
:type system_prompt: Optional[str], optional
|
||||||
:raises TypeError: LLM, database or embedder or their config is not a valid class instance.
|
: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
|
# Type check configs
|
||||||
if config and not isinstance(config, AppConfig):
|
if config and not isinstance(config, AppConfig):
|
||||||
raise TypeError(
|
raise TypeError(
|
||||||
|
|||||||
Reference in New Issue
Block a user