Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(bearerToken string) gin.HandlerFunc
AuthMiddleware is a middleware function that checks for a valid bearer token in the Authorization header If the token is valid, the request is allowed to proceed. If the token is missing or invalid, a 401 Unauthorized response is returned.
Types ¶
type ChatHandler ¶
type ChatHandler struct {
// contains filtered or unexported fields
}
ChatHandler handles chat-related HTTP requests
func NewChatHandler ¶
func NewChatHandler(sessionService *service.SessionService, akashService *service.AkashService) *ChatHandler
NewChatHandler creates a new ChatHandler instance
func (*ChatHandler) ChatCompletions ¶
func (h *ChatHandler) ChatCompletions(c *gin.Context)
ChatCompletions handles the /v1/chat/completions endpoint
type ModelHandler ¶
type ModelHandler struct{}
ModelHandler handles model-related HTTP requests
func NewModelHandler ¶
func NewModelHandler() *ModelHandler
NewModelHandler creates a new ModelHandler instance
func (*ModelHandler) GetModels ¶
func (h *ModelHandler) GetModels(c *gin.Context)
GetModels handles the /v1/models endpoint
Click to show internal directories.
Click to hide internal directories.