Documentation
¶
Index ¶
- func BuildArgs(rc *config.RunConfig) []string
- func DeriveCLIBinary(serverBin, backend string) string
- func FormatArgs(binaryPath string, rc *config.RunConfig) string
- func FormatInteractiveArgs(cliBin string, rc *config.RunConfig) string
- func WaitHealthy(ctx context.Context, host string, port int, backend string) error
- type Runner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildArgs ¶
BuildArgs converts a RunConfig into the argv slice for the appropriate backend binary. This is a pure function — both --dry-run and inspect use it.
The "ik_llama" backend is treated as a llama.cpp drop-in: it shares the llama-server CLI and reuses every flag buildLlamaArgs produces, then layers on the ik-only flags from cfg.IKLlama at the end. The fork is forgiving of unknown flags it has dropped from upstream, so we don't filter the base set; if a specific upstream flag becomes incompatible, gate it here.
func DeriveCLIBinary ¶
DeriveCLIBinary is the exported version for use in cmd/.
func FormatArgs ¶
FormatArgs returns the BuildArgs result as a human-readable command string.
func FormatInteractiveArgs ¶
FormatInteractiveArgs returns the llama-cli command as a human-readable string.
Types ¶
type Runner ¶
type Runner interface {
Start(ctx context.Context, rc *config.RunConfig) (*state.ModelState, error)
Stop(ctx context.Context, ms *state.ModelState, timeout time.Duration) error
IsAlive(ms *state.ModelState) bool
}
Runner manages the llama-server process lifecycle.
func NewInteractive ¶
func NewInteractive() Runner
NewInteractive returns a runner that launches llama-cli in the foreground.