Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -93,7 +93,7 @@ async def list_models():
|
|
| 93 |
# Return available models info
|
| 94 |
return [model.dict() for model in AVAILABLE_MODELS]
|
| 95 |
|
| 96 |
-
@app.get("/api/models")
|
| 97 |
async def api_models():
|
| 98 |
return {"models": [model.dict() for model in AVAILABLE_MODELS]}
|
| 99 |
|
|
@@ -140,7 +140,7 @@ async def chat(req: ChatRequest):
|
|
| 140 |
}
|
| 141 |
return response
|
| 142 |
|
| 143 |
-
@app.post("/api/generate")
|
| 144 |
async def api_generate(req: GenerateRequest):
|
| 145 |
global llm
|
| 146 |
if llm is None:
|
|
|
|
| 93 |
# Return available models info
|
| 94 |
return [model.dict() for model in AVAILABLE_MODELS]
|
| 95 |
|
| 96 |
+
@app.get("/api/v0/models")
|
| 97 |
async def api_models():
|
| 98 |
return {"models": [model.dict() for model in AVAILABLE_MODELS]}
|
| 99 |
|
|
|
|
| 140 |
}
|
| 141 |
return response
|
| 142 |
|
| 143 |
+
@app.post("/api/v0/generate")
|
| 144 |
async def api_generate(req: GenerateRequest):
|
| 145 |
global llm
|
| 146 |
if llm is None:
|