Config: Fix draft model migration and loading

The loader takes in the "draft" parameter, so map the config model
to that when creating kwargs for initial load.

Also map the old "draft" key to the new "draft_model" key.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2024-09-17 22:48:56 -04:00
parent a34bd9a684
commit 754fb15f23
2 changed files with 6 additions and 2 deletions

View file

@ -72,7 +72,7 @@ class TabbyConfig(TabbyConfigModel):
if model_cfg.get("draft"):
legacy = True
cfg["draft"] = model_cfg["draft"]
cfg["draft_model"] = model_cfg["draft"]
if model_cfg.get("lora"):
legacy = True