mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-27 01:38:56 +00:00
config is now backed by pydantic (WIP)
- add models for config options - add function to regenerate config.yml - replace references to config with pydantic compatible references - remove unnecessary unwrap() statements TODO: - auto generate env vars - auto generate argparse - test loading a model
This commit is contained in:
@@ -76,9 +76,9 @@ def _get_download_folder(repo_id: str, repo_type: str, folder_name: Optional[str
|
||||
"""Gets the download folder for the repo."""
|
||||
|
||||
if repo_type == "lora":
|
||||
download_path = pathlib.Path(config.lora.get("lora_dir") or "loras")
|
||||
download_path = pathlib.Path(config.lora.lora_dir)
|
||||
else:
|
||||
download_path = pathlib.Path(config.model.get("model_dir") or "models")
|
||||
download_path = pathlib.Path(config.model.model_dir)
|
||||
|
||||
download_path = download_path / (folder_name or repo_id.split("/")[-1])
|
||||
return download_path
|
||||
|
||||
Reference in New Issue
Block a user