41 lines
814 B
Go
41 lines
814 B
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.10.1
|
|
|
|
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
chat "cursor-api-proxy/internal/handler/chat"
|
|
"cursor-api-proxy/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/rest"
|
|
)
|
|
|
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/health",
|
|
Handler: chat.HealthHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodGet,
|
|
Path: "/v1/models",
|
|
Handler: chat.ModelsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/v1/chat/completions",
|
|
Handler: chat.ChatCompletionsHandler(serverCtx),
|
|
},
|
|
{
|
|
Method: http.MethodPost,
|
|
Path: "/v1/messages",
|
|
Handler: chat.AnthropicMessagesHandler(serverCtx),
|
|
},
|
|
},
|
|
)
|
|
}
|