Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var MimeTypes = map[string]string{}/* 732 elements not displayed */
Functions ¶
func AuthMiddleware ¶
func AuthMiddleware(cfg *ServerConfig) gin.HandlerFunc
AuthMiddleware authenticates requests using API keys
Types ¶
type APIHandlers ¶
type APIHandlers struct {
// contains filtered or unexported fields
}
APIHandlers contains the handlers for API endpoints
func NewAPIHandlers ¶
func NewAPIHandlers(cliClients []*client.Client, debug bool) *APIHandlers
NewAPIHandlers creates a new API handlers instance
func (*APIHandlers) ChatCompletions ¶
func (h *APIHandlers) ChatCompletions(c *gin.Context)
ChatCompletions handles the /v1/chat/completions endpoint
func (*APIHandlers) Models ¶
func (h *APIHandlers) Models(c *gin.Context)
type ErrorDetail ¶
type ErrorDetail struct { Message string `json:"message"` Type string `json:"type"` Code string `json:"code,omitempty"` }
ErrorDetail represents error details
type ErrorResponse ¶
type ErrorResponse struct {
Error ErrorDetail `json:"error"`
}
ErrorResponse represents an error response
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the API server
type ServerConfig ¶
ServerConfig contains configuration for the API server
Click to show internal directories.
Click to hide internal directories.