mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-03-15 00:07:28 +00:00
API: Upgrade config declarations
Some were using the old unwrap methods. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@@ -130,7 +130,7 @@ async def load_inline_model(model_name: str, request: Request):
|
||||
|
||||
raise HTTPException(401, error_message)
|
||||
|
||||
if not unwrap(config.model.get("inline_model_loading"), False):
|
||||
if not config.model.inline_model_loading:
|
||||
logger.warning(
|
||||
f"Unable to switch model to {model_name} because "
|
||||
'"inline_model_loading" is not True in config.yml.'
|
||||
@@ -138,7 +138,7 @@ async def load_inline_model(model_name: str, request: Request):
|
||||
|
||||
return
|
||||
|
||||
model_path = pathlib.Path(unwrap(config.model.get("model_dir"), "models"))
|
||||
model_path = pathlib.Path(config.model.model_dir)
|
||||
model_path = model_path / model_name
|
||||
|
||||
# Model path doesn't exist
|
||||
|
||||
Reference in New Issue
Block a user