Refactor API endpoints to use /backends/llama-cpp path and update related documentation

This commit is contained in:
2025-09-23 21:27:58 +02:00
parent 322e1c5eb7
commit 30e40ecd30
5 changed files with 228 additions and 231 deletions

View File

@@ -44,15 +44,12 @@ func SetupRouter(handler *Handler) *chi.Mux {
r.Get("/version", handler.VersionHandler()) // Get server version
r.Route("/server", func(r chi.Router) {
r.Get("/help", handler.LlamaServerHelpHandler())
r.Get("/version", handler.LlamaServerVersionHandler())
r.Get("/devices", handler.LlamaServerListDevicesHandler())
})
// Backend-specific endpoints
r.Route("/backends", func(r chi.Router) {
r.Route("/llama-cpp", func(r chi.Router) {
r.Get("/help", handler.LlamaServerHelpHandler())
r.Get("/version", handler.LlamaServerVersionHandler())
r.Get("/devices", handler.LlamaServerListDevicesHandler())
r.Post("/parse-command", handler.ParseLlamaCommand())
})
r.Route("/mlx", func(r chi.Router) {