server

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatRequest

type ChatRequest struct {
	Message string `json:"message"`
	Model   string `json:"model"`
}

Add these type definitions:

type ErrorResponse

type ErrorResponse struct {
	Error string `json:"error"`
}

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(port string) (*Server, error)

func (*Server) HandleChatStream

func (s *Server) HandleChatStream(c *gin.Context)

HandleChatStream manages the WebSocket connection and Engine execution

func (*Server) HandleListModels

func (s *Server) HandleListModels(c *gin.Context)

HandleListModels returns all available local models

func (*Server) HandlePullModel

func (s *Server) HandlePullModel(c *gin.Context)

HandlePullModel triggers a background download

func (*Server) Start

func (s *Server) Start() error

func (*Server) WsHandler

func (s *Server) WsHandler(c *gin.Context)

WsHandler upgrades the HTTP connection to a WebSocket

Jump to

Keyboard shortcuts

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