Unverified Commit b2ba795c authored by chenmz00's avatar chenmz00 Committed by GitHub
Browse files

fix: list models API

Fix the list models API to match the corresponding OpenAI API format.
parent 2753a4a6
......@@ -13,7 +13,7 @@ router = APIRouter()
@router.get('/models', tags=['openai'])
async def list_models():
return [{"id": Config().model_name, "name": Config().model_name}]
return {"data": [{"id": Config().model_name, "name": Config().model_name}], "object": "list"}
@router.post('/chat/completions', tags=['openai'])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment