mirror of
https://github.com/kvcache-ai/ktransformers.git
synced 2025-09-11 15:54:37 +00:00
fix: list models API
Fix the list models API to match the corresponding OpenAI API format.
This commit is contained in:
parent
2753a4a654
commit
b2ba795cfd
1 changed files with 1 additions and 1 deletions
|
@ -13,7 +13,7 @@ router = APIRouter()
|
||||||
|
|
||||||
@router.get('/models', tags=['openai'])
|
@router.get('/models', tags=['openai'])
|
||||||
async def list_models():
|
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'])
|
@router.post('/chat/completions', tags=['openai'])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue