mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Change openai models list result output to match the dummy model example.
Change openai models list result output to match the dummy model example.
This commit is contained in:
parent
0a67325809
commit
e0d466ed14
@ -14,7 +14,15 @@ def get_current_model_info():
|
||||
|
||||
|
||||
def list_models():
|
||||
return {'model_names': get_available_models()[1:]}
|
||||
result = {
|
||||
"object": "list",
|
||||
"data": []
|
||||
}
|
||||
# get models and add them to the result
|
||||
for model in get_available_models():
|
||||
result["data"].append(model_info_dict(model))
|
||||
|
||||
return {'model_names': result}
|
||||
|
||||
|
||||
def list_dummy_models():
|
||||
|
Loading…
Reference in New Issue
Block a user