common

package
v1.0.0-beta.32 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2026 License: GPL-3.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const OpenAiEndpointKey = "openai"

Variables

View Source
var (
	ErrPermissionDenied = errors.New("permission denied, try again with sudo")
)

Functions

func ChatClient

func ChatClient(baseUrl string, modelName string, verbose bool) *chatClient

func ComponentInstalled

func ComponentInstalled(component string) (bool, error)

func ConfirmationPrompt

func ConfirmationPrompt(prompt string) bool

ConfirmationPrompt prompts the user for a yes/no answer and returns true for 'y', false for 'n'.

func LoadEngineEnvironment

func LoadEngineEnvironment(ctx *Context) error

func ScoreEngines

func ScoreEngines(ctx *Context) ([]engines.ScoredManifest, error)

func ServerApiUrls

func ServerApiUrls(ctx *Context) (map[string]string, error)

func SetEngineConfig

func SetEngineConfig(engine *engines.Manifest, ctx *Context) error

SetEngineConfig sets configurations of the given engine. It does not unset previous engine configurations.

func StartProgressSpinner

func StartProgressSpinner(prefix string) (stop func())

func SuggestEngineInfo

func SuggestEngineInfo() string

func SuggestServerLogs

func SuggestServerLogs() string

func SuggestServerStartup

func SuggestServerStartup() string

func SuggestServiceManagement

func SuggestServiceManagement() string

func SuggestStartServer

func SuggestStartServer() string

func UnsetEngineConfig

func UnsetEngineConfig(engineName string, unsetUserOverrides bool, ctx *Context) error

Types

type Context

type Context struct {
	EnginesDir string
	Verbose    bool
	Cache      storage.Cache
	Config     storage.Config
}

Jump to

Keyboard shortcuts

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