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
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS.
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():