mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-26 17:50:22 +01:00
Update script.py
Fixes bug #5675 that lists dummy models instead of loaded models in OpenAI extension. v1/models.
This commit is contained in:
parent
49b111e2dd
commit
0a67325809
@ -145,7 +145,7 @@ async def handle_models(request: Request):
|
|||||||
is_list = request.url.path.split('?')[0].split('#')[0] == '/v1/models'
|
is_list = request.url.path.split('?')[0].split('#')[0] == '/v1/models'
|
||||||
|
|
||||||
if is_list:
|
if is_list:
|
||||||
response = OAImodels.list_dummy_models()
|
response = OAImodels.list_models()
|
||||||
else:
|
else:
|
||||||
model_name = path[len('/v1/models/'):]
|
model_name = path[len('/v1/models/'):]
|
||||||
response = OAImodels.model_info_dict(model_name)
|
response = OAImodels.model_info_dict(model_name)
|
||||||
|
Loading…
Reference in New Issue
Block a user