- added available models into dummy models

- changed args and settings to the get method to make it more Robust and easier to use
This commit is contained in:
Blazzycrafter 2024-11-18 17:15:29 +01:00
parent 768124c4b0
commit 6f0f214408
No known key found for this signature in database
GPG Key ID: B898F1F9BDCDD1D3

View File

@ -24,9 +24,12 @@ def list_dummy_models():
"data": []
}
models = get_available_models()[1:]
# these are expected by so much, so include some here as a dummy
for model in ['gpt-3.5-turbo', 'text-embedding-ada-002']:
result["data"].append(model_info_dict(model))
for model in models:
result["data"].append(model_info_dict(model))
return result
@ -42,8 +45,8 @@ def model_info_dict(model_name: str) -> dict:
def _load_model(data):
model_name = data["model_name"]
args = data["args"]
settings = data["settings"]
args = data.get("args", None)
settings = data.get("settings", None)
unload_model()
model_settings = get_model_metadata(model_name)