Update script.py

Fixes bug #5675 that lists dummy models instead of loaded models in OpenAI extension. v1/models.
This commit is contained in:
Jonathan Sowards 2024-03-17 19:08:37 -06:00 committed by GitHub
parent 49b111e2dd
commit 0a67325809
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -145,7 +145,7 @@ async def handle_models(request: Request):
is_list = request.url.path.split('?')[0].split('#')[0] == '/v1/models'
if is_list:
response = OAImodels.list_dummy_models()
response = OAImodels.list_models()
else:
model_name = path[len('/v1/models/'):]
response = OAImodels.model_info_dict(model_name)