localai

package
v1.25.0 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyGalleryFromFile

func ApplyGalleryFromFile(modelPath, s string, cm *config.ConfigLoader, galleries []gallery.Gallery) error

func ApplyGalleryFromString

func ApplyGalleryFromString(modelPath, s string, cm *config.ConfigLoader, galleries []gallery.Gallery) error

func ApplyModelGalleryEndpoint

func ApplyModelGalleryEndpoint(modelPath string, cm *config.ConfigLoader, g chan galleryOp, galleries []gallery.Gallery) func(c *fiber.Ctx) error

func BackendMonitorEndpoint added in v1.25.0

func BackendMonitorEndpoint(bm BackendMonitor) func(c *fiber.Ctx) error

func BackendShutdownEndpoint added in v1.25.0

func BackendShutdownEndpoint(bm BackendMonitor) func(c *fiber.Ctx) error

func GetOpStatusEndpoint

func GetOpStatusEndpoint(g *galleryApplier) func(c *fiber.Ctx) error

func ListModelFromGalleryEndpoint

func ListModelFromGalleryEndpoint(galleries []gallery.Gallery, basePath string) func(c *fiber.Ctx) error

func NewGalleryService

func NewGalleryService(modelPath string) *galleryApplier

func TTSEndpoint

func TTSEndpoint(cm *config.ConfigLoader, o *options.Option) func(c *fiber.Ctx) error

Types

type BackendMonitor added in v1.25.0

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

func NewBackendMonitor added in v1.25.0

func NewBackendMonitor(configLoader *config.ConfigLoader, options *options.Option) BackendMonitor

func (*BackendMonitor) SampleLocalBackendProcess added in v1.25.0

func (bm *BackendMonitor) SampleLocalBackendProcess(model string) (*BackendMonitorResponse, error)

type BackendMonitorRequest added in v1.25.0

type BackendMonitorRequest struct {
	Model string `json:"model" yaml:"model"`
}

type BackendMonitorResponse added in v1.25.0

type BackendMonitorResponse struct {
	MemoryInfo    *gopsutil.MemoryInfoStat
	MemoryPercent float32
	CPUPercent    float64
}

type GalleryModel

type GalleryModel struct {
	ID string `json:"id"`
	gallery.GalleryModel
}

type TTSRequest

type TTSRequest struct {
	Model   string `json:"model" yaml:"model"`
	Input   string `json:"input" yaml:"input"`
	Backend string `json:"backend" yaml:"backend"`
}

Jump to

Keyboard shortcuts

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