localllm

package
v0.35.3 Latest Latest
Warning

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

Go to latest
Published: May 19, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindServerBinary

func FindServerBinary() (string, error)

func ProbeEndpoint

func ProbeEndpoint(ctx context.Context, baseURL string) error

func ValidateModelPath

func ValidateModelPath(path string) error

ValidateModelPath verifies that path points at a safe GGUF model filename.

Types

type InstallStatus

type InstallStatus struct {
	BinaryFound bool     `json:"binaryFound"`
	BinaryPath  string   `json:"binaryPath"`
	ModelFound  bool     `json:"modelFound"`
	ModelPath   string   `json:"modelPath"`
	ModelBytes  int64    `json:"modelBytes"`
	ServerReady bool     `json:"serverReady"`
	Problems    []string `json:"problems,omitempty"`
}

type Server

type Server struct {
	BaseURL     string
	Port        int
	ModelPath   string
	GPU         string
	ContextSize int
	Threads     int
	Validation  netsec.ValidationOptions
	// contains filtered or unexported fields
}

Server manages SpeechKit's bundled llama.cpp OpenAI-compatible server.

func NewServer

func NewServer(port int, modelPath, gpu string) *Server

func (*Server) Health

func (s *Server) Health(ctx context.Context) error

func (*Server) IsReady

func (s *Server) IsReady() bool

func (*Server) RuntimeKey

func (s *Server) RuntimeKey() string

func (*Server) StartServer

func (s *Server) StartServer(ctx context.Context) error

func (*Server) StopServer

func (s *Server) StopServer()

func (*Server) VerifyInstallation

func (s *Server) VerifyInstallation() InstallStatus

Jump to

Keyboard shortcuts

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