API: Re-add depends endpoints

Mistakenly removed API key authentication for the models endpoints in
testing.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri 2023-11-17 00:47:51 -05:00
parent ac4e9c2277
commit 021981fce0

View file

@ -47,8 +47,8 @@ app.add_middleware(
)
# Model list endpoint
@app.get("/v1/models")
@app.get("/v1/model/list")
@app.get("/v1/models", dependencies=[Depends(check_api_key)])
@app.get("/v1/model/list", dependencies=[Depends(check_api_key)])
async def list_models():
model_config = config.get("model", {})
if "model_dir" in model_config: