OAI: Add API-based model loading/unloading and auth routes

Models can be loaded and unloaded via the API. Also add authentication
to use the API and for administrator tasks.

Both types of authorization use different keys.

Also fix the unload function to properly free all used vram.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-11-14 01:17:19 -05:00
parent 47343e2f1a
commit b625bface9
11 changed files with 195 additions and 55 deletions

3
api_tokens.yml Normal file
View File

@@ -0,0 +1,3 @@
!!python/object:auth.AuthKeys
admin_key: 5b9e30a4197557dcd6cf48445ee174dc
api_key: 2261702e8a220c6c4671a264cd1236ce