diff --git a/exo/api/chatgpt_api.py b/exo/api/chatgpt_api.py index ef9634003..820689217 100644 --- a/exo/api/chatgpt_api.py +++ b/exo/api/chatgpt_api.py @@ -291,7 +291,8 @@ async def process_model(model_name, pretty): ) async def handle_get_models(self, request): - return web.json_response([{"id": model_name, "object": "model", "owned_by": "exo", "ready": True} for model_name, _ in model_cards.items()]) + models_list = [{"id": model_name, "object": "model", "owned_by": "exo", "ready": True} for model_name, _ in model_cards.items()] + return web.json_response({"object": "list", "data": models_list}) async def handle_post_chat_token_encode(self, request): data = await request.json()