mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-22 23:38:57 +00:00
Merge branch 'main' into vision
This commit is contained in:
@@ -40,6 +40,7 @@ from endpoints.core.utils.lora import get_active_loras, get_lora_list
|
||||
from endpoints.core.utils.model import (
|
||||
get_current_model,
|
||||
get_current_model_list,
|
||||
get_dummy_models,
|
||||
get_model_list,
|
||||
stream_model_load,
|
||||
)
|
||||
@@ -83,7 +84,7 @@ async def list_models(request: Request) -> ModelList:
|
||||
models = await get_current_model_list()
|
||||
|
||||
if config.model.use_dummy_models:
|
||||
models.data.insert(0, ModelCard(id="gpt-3.5-turbo"))
|
||||
models.data[:0] = get_dummy_models()
|
||||
|
||||
return models
|
||||
|
||||
|
||||
@@ -92,6 +92,13 @@ def get_current_model():
|
||||
return model_card
|
||||
|
||||
|
||||
def get_dummy_models():
|
||||
if config.model.dummy_model_names:
|
||||
return [ModelCard(id=dummy_id) for dummy_id in config.model.dummy_model_names]
|
||||
else:
|
||||
return [ModelCard(id="gpt-3.5-turbo")]
|
||||
|
||||
|
||||
async def stream_model_load(
|
||||
data: ModelLoadRequest,
|
||||
model_path: pathlib.Path,
|
||||
|
||||
Reference in New Issue
Block a user