handler

package
v0.0.0-...-8050d09 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 12, 2025 License: AGPL-3.0 Imports: 6 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL