API: Switch unload method to POST

GET and POST can be used interchangeably in this case, but adhere
to the HTTP spec.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2024-01-04 21:11:36 -05:00
parent cd4bf99598
commit c1642076c2

View file

@ -236,7 +236,7 @@ async def load_model(request: Request, data: ModelLoadRequest):
# Unload model endpoint
@app.get(
@app.post(
"/v1/model/unload",
dependencies=[Depends(check_admin_key), Depends(_check_model_container)],
)
@ -318,7 +318,7 @@ async def load_lora(data: LoraLoadRequest):
# Unload lora endpoint
@app.get(
@app.post(
"/v1/lora/unload",
dependencies=[Depends(check_admin_key), Depends(_check_model_container)],
)