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:
Jonathan Sowards 2024-03-17 19:38:05 -06:00 committed by GitHub
parent 0a67325809
commit e0d466ed14
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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():