fix(base.py): change import to from platformdirs
This commit is contained in:
parent
7713173da7
commit
819c283fe3
1 changed files with 2 additions and 2 deletions
|
|
@ -55,14 +55,14 @@ class Settings(BaseSettings):
|
||||||
@validator("CONFIG_DIR", pre=True, allow_reuse=True)
|
@validator("CONFIG_DIR", pre=True, allow_reuse=True)
|
||||||
def set_langflow_dir(cls, value):
|
def set_langflow_dir(cls, value):
|
||||||
if not value:
|
if not value:
|
||||||
import platformdirs
|
from platformdirs import user_cache_dir
|
||||||
|
|
||||||
# Define the app name and author
|
# Define the app name and author
|
||||||
app_name = "langflow"
|
app_name = "langflow"
|
||||||
app_author = "logspace"
|
app_author = "logspace"
|
||||||
|
|
||||||
# Get the cache directory for the application
|
# Get the cache directory for the application
|
||||||
cache_dir = platformdirs.user_cache_dir(app_name, app_author)
|
cache_dir = user_cache_dir(app_name, app_author)
|
||||||
|
|
||||||
# Create a .langflow directory inside the cache directory
|
# Create a .langflow directory inside the cache directory
|
||||||
value = Path(cache_dir)
|
value = Path(cache_dir)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue