mirror of
https://github.com/imartinez/privateGPT.git
synced 2025-04-28 11:36:25 +00:00
* Remove all global settings state * chore: remove autogenerated class * chore: cleanup * chore: merge conflicts
19 lines
517 B
Python
19 lines
517 B
Python
from pathlib import Path
|
|
|
|
from private_gpt.constants import PROJECT_ROOT_PATH
|
|
from private_gpt.settings.settings import settings
|
|
|
|
|
|
def _absolute_or_from_project_root(path: str) -> Path:
|
|
if path.startswith("/"):
|
|
return Path(path)
|
|
return PROJECT_ROOT_PATH / path
|
|
|
|
|
|
models_path: Path = PROJECT_ROOT_PATH / "models"
|
|
models_cache_path: Path = models_path / "cache"
|
|
docs_path: Path = PROJECT_ROOT_PATH / "docs"
|
|
local_data_path: Path = _absolute_or_from_project_root(
|
|
settings().data.local_data_folder
|
|
)
|