localai

package
v1.40.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: MIT Imports: 18 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 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 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 ModelGalleryService added in v1.30.0

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

func CreateModelGalleryService added in v1.30.0

func CreateModelGalleryService(galleries []gallery.Gallery, modelPath string, galleryApplier *galleryApplier) ModelGalleryService

func (*ModelGalleryService) AddModelGalleryEndpoint added in v1.30.0

func (mgs *ModelGalleryService) AddModelGalleryEndpoint() func(c *fiber.Ctx) error

func (*ModelGalleryService) ApplyModelGalleryEndpoint added in v1.30.0

func (mgs *ModelGalleryService) ApplyModelGalleryEndpoint() func(c *fiber.Ctx) error

func (*ModelGalleryService) GetAllStatusEndpoint added in v1.30.0

func (mgs *ModelGalleryService) GetAllStatusEndpoint() func(c *fiber.Ctx) error

func (*ModelGalleryService) GetOpStatusEndpoint added in v1.30.0

func (mgs *ModelGalleryService) GetOpStatusEndpoint() func(c *fiber.Ctx) error

func (*ModelGalleryService) ListModelFromGalleryEndpoint added in v1.30.0

func (mgs *ModelGalleryService) ListModelFromGalleryEndpoint() func(c *fiber.Ctx) error

func (*ModelGalleryService) ListModelGalleriesEndpoint added in v1.30.0

func (mgs *ModelGalleryService) ListModelGalleriesEndpoint() func(c *fiber.Ctx) error

NOTE: This is different (and much simpler!) than above! This JUST lists the model galleries that have been loaded, not their contents!

func (*ModelGalleryService) RemoveModelGalleryEndpoint added in v1.30.0

func (mgs *ModelGalleryService) RemoveModelGalleryEndpoint() func(c *fiber.Ctx) error

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