API: Add route for draft model list

Does the same thing as model list except with draft models.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-12-19 23:45:53 -05:00
parent ce2602df9a
commit c9e43e51aa
2 changed files with 16 additions and 6 deletions

View File

@@ -77,9 +77,9 @@ def create_chat_completion_stream_chunk(const_id: str,
return chunk
def get_model_list(model_path: pathlib.Path, draft_model_path: Optional[str]):
def get_model_list(model_path: pathlib.Path, draft_model_path: Optional[str] = None):
# Convert the draft model path to a pathlib path for equality comparisons
# Convert the provided draft model path to a pathlib path for equality comparisons
if draft_model_path:
draft_model_path = pathlib.Path(draft_model_path).resolve()