Documentation
¶
Index ¶
- Constants
- Variables
- func AdditionalFeatures() additionalFeatures
- func ChatClient(baseUrl string, modelName string, verbose bool) *chatClient
- func ComponentInstalled(component string) (bool, error)
- func ConfirmationPrompt(prompt string) bool
- func LoadEngineEnvironment(ctx *Context) error
- func ScoreEngines(ctx *Context) ([]engines.ScoredManifest, error)
- func ServerEndpoints(ctx *Context) (map[string]string, error)
- func SetEngineConfig(engine *engines.Manifest, ctx *Context) error
- func StartProgressSpinner(prefix string) (stop func())
- func SuggestEngineInfo() string
- func SuggestServerLogs() string
- func SuggestServerStartup() string
- func SuggestServiceManagement() string
- func SuggestStartServer() string
- func UnsetEngineConfig(engineName string, unsetUserOverrides bool, ctx *Context) error
- type ComponentSettings
- type Context
- type EngineDetails
Constants ¶
View Source
const (
OpenAiEndpointKey = "openai"
)
View Source
const (
ProgressScoring = "Checking engines"
)
Variables ¶
View Source
var (
ErrPermissionDenied = errors.New("permission denied, try again with sudo")
)
Functions ¶
func AdditionalFeatures ¶
func AdditionalFeatures() additionalFeatures
func ChatClient ¶
func ComponentInstalled ¶
func ConfirmationPrompt ¶
ConfirmationPrompt prompts the user for a yes/no answer and returns true for 'y', false for 'n'.
func LoadEngineEnvironment ¶
LoadEngineEnvironment sets env vars of the active engine's components for the current process
func ScoreEngines ¶
func ScoreEngines(ctx *Context) ([]engines.ScoredManifest, error)
ScoreEngines loads all engine manifests, looks up the host machine information, and scores the engines according to their compatibility with the host.
Warning: calls to this function can block for a number of seconds while the host machine information is being looked up.
func SetEngineConfig ¶
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
Types ¶
type ComponentSettings ¶
type ComponentSettings struct {
Servers map[string]map[string]string `yaml:"servers"`
Environment []string `yaml:"environment"`
// contains filtered or unexported fields
}
func EngineComponentSettings ¶
func EngineComponentSettings(ctx *Context) ([]ComponentSettings, error)
type EngineDetails ¶
type EngineDetails struct {
engines.ScoredManifest
Compatible bool `yaml:"compatible" json:"compatible"`
CompatibilityIssues []string `yaml:"compatibility-issues,omitempty" json:"compatibility-issues,omitempty"`
}
func NewEngineDetails ¶
func NewEngineDetails(scoredManifest engines.ScoredManifest) EngineDetails
Click to show internal directories.
Click to hide internal directories.