mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 10:35:01 +00:00
feat: backend monitor shutdown endpoint, process based (#938)
This PR adds a new endpoint to the backend monitor section `/backend/shutdown` which terminates the grpc process for the related model.
This commit is contained in:
parent
901f0709c5
commit
10b0e13882
3 changed files with 51 additions and 19 deletions
|
@ -218,6 +218,7 @@ func App(opts ...options.AppOption) (*fiber.App, error) {
|
|||
// Experimental Backend Statistics Module
|
||||
backendMonitor := localai.NewBackendMonitor(cl, options) // Split out for now
|
||||
app.Get("/backend/monitor", localai.BackendMonitorEndpoint(backendMonitor))
|
||||
app.Post("/backend/shutdown", localai.BackendShutdownEndpoint(backendMonitor))
|
||||
|
||||
// models
|
||||
app.Get("/v1/models", auth, openai.ListModelsEndpoint(options.Loader, cl))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue