mirror of
https://github.com/lordmathis/llamactl.git
synced 2025-11-06 09:04:27 +00:00
Add OpenAIProxy handler to route requests based on instance name
This commit is contained in:
@@ -48,6 +48,7 @@ func SetupRouter(handler *Handler) *chi.Mux {
|
||||
})
|
||||
|
||||
// OpenAI-compatible endpoints (model name in request body determines routing)
|
||||
r.Post("/v1/", handler.OpenAIProxy()) // Proxy to OpenAI-compatible endpoints based on instance name in request body
|
||||
// r.Post("/v1/completions", handler.OpenAICompletions()) // Route based on model name in request
|
||||
// r.Post("/v1/chat/completions", handler.OpenAIChatCompletions()) // Route based on model name in request
|
||||
// r.Post("/v1/embeddings", handler.OpenAIEmbeddings()) // Route based on model name in request (if supported)
|
||||
|
||||
Reference in New Issue
Block a user