Initialize global library constants and utility functions
This commit is contained in:
@@ -41,6 +41,9 @@ router = APIRouter(tags=["local-rag"])
|
|||||||
|
|
||||||
LIB_ROOT = library_root()
|
LIB_ROOT = library_root()
|
||||||
|
|
||||||
|
GLOBAL_LIBRARY_SLUG = "_global"
|
||||||
|
GLOBAL_LIBRARY_NAME = "Knowledge"
|
||||||
|
MIGRATED_LIBRARY_ARCHIVE = "_migrated_libraries"
|
||||||
RAW_CORPUS_PROFILE = "per-file-default-v1"
|
RAW_CORPUS_PROFILE = "per-file-default-v1"
|
||||||
PREPARE_PROFILE = "selective-enrich-v2"
|
PREPARE_PROFILE = "selective-enrich-v2"
|
||||||
DEFAULT_EMBED_MODEL = DEFAULT_EMBED_MODEL_SETTING
|
DEFAULT_EMBED_MODEL = DEFAULT_EMBED_MODEL_SETTING
|
||||||
@@ -145,6 +148,10 @@ def lib_json(slug: str) -> Path:
|
|||||||
return lib_dir(slug) / "library.json"
|
return lib_dir(slug) / "library.json"
|
||||||
|
|
||||||
|
|
||||||
|
def global_library_slug() -> str:
|
||||||
|
return GLOBAL_LIBRARY_SLUG
|
||||||
|
|
||||||
|
|
||||||
def stage_dir(slug: str) -> Path:
|
def stage_dir(slug: str) -> Path:
|
||||||
path = lib_dir(slug) / "stage"
|
path = lib_dir(slug) / "stage"
|
||||||
path.mkdir(parents=True, exist_ok=True)
|
path.mkdir(parents=True, exist_ok=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user