Skip to content

Commit

Permalink
API: Switch unload method to POST
Browse files Browse the repository at this point in the history
GET and POST can be used interchangeably in this case, but adhere
to the HTTP spec.

Signed-off-by: kingbri <[email protected]>
  • Loading branch information
bdashore3 committed Jan 5, 2024
1 parent cd4bf99 commit c164207
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ async def generator():


# Unload model endpoint
@app.get(
@app.post(
"/v1/model/unload",
dependencies=[Depends(check_admin_key), Depends(_check_model_container)],
)
Expand Down Expand Up @@ -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)],
)
Expand Down

0 comments on commit c164207

Please sign in to comment.