mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2026-04-06 07:03:37 +00:00
API: Add thinking block signature field, fix error codes, clean up logging
This commit is contained in:
parent
307d0c92be
commit
02f18a1d65
4 changed files with 10 additions and 7 deletions
|
|
@ -506,12 +506,17 @@ async def handle_load_model(request_data: LoadModelRequest):
|
|||
return JSONResponse(content="OK")
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
raise HTTPException(status_code=400, detail="Failed to load the model.")
|
||||
raise HTTPException(status_code=500, detail="Failed to load the model.")
|
||||
|
||||
|
||||
@app.post("/v1/internal/model/unload", dependencies=check_admin_key)
|
||||
async def handle_unload_model():
|
||||
unload_model()
|
||||
try:
|
||||
unload_model()
|
||||
return JSONResponse(content="OK")
|
||||
except Exception:
|
||||
traceback.print_exc()
|
||||
raise HTTPException(status_code=500, detail="Failed to unload the model.")
|
||||
|
||||
|
||||
@app.get("/v1/internal/lora/list", response_model=LoraListResponse, dependencies=check_admin_key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue