Update app.py
Browse files
app.py
CHANGED
|
@@ -431,6 +431,7 @@ async def chatResponseStream(request: ChatCompletionRequest, model_state: any, c
|
|
| 431 |
|
| 432 |
yield "data: [DONE]\n\n"
|
| 433 |
|
|
|
|
| 434 |
@app.post("/api/v1/chat/completions")
|
| 435 |
async def chat_completions(request: ChatCompletionRequest):
|
| 436 |
completionId = str(next(CompletionIdGenerator))
|
|
@@ -472,6 +473,7 @@ async def chat_completions(request: ChatCompletionRequest):
|
|
| 472 |
return StreamingResponse(chatResponseStream(realRequest, None, completionId, is_reasoning), media_type="text/event-stream")
|
| 473 |
|
| 474 |
@app.get("/api/v1/models")
|
|
|
|
| 475 |
@app.get("/models")
|
| 476 |
async def list_models():
|
| 477 |
models_list = []
|
|
|
|
| 431 |
|
| 432 |
yield "data: [DONE]\n\n"
|
| 433 |
|
| 434 |
+
@app.post("/v1/chat/completions")
|
| 435 |
@app.post("/api/v1/chat/completions")
|
| 436 |
async def chat_completions(request: ChatCompletionRequest):
|
| 437 |
completionId = str(next(CompletionIdGenerator))
|
|
|
|
| 473 |
return StreamingResponse(chatResponseStream(realRequest, None, completionId, is_reasoning), media_type="text/event-stream")
|
| 474 |
|
| 475 |
@app.get("/api/v1/models")
|
| 476 |
+
@app.get("/v1/models")
|
| 477 |
@app.get("/models")
|
| 478 |
async def list_models():
|
| 479 |
models_list = []
|