yera.cli.setup_handlers.llama_cpp

Llama-cpp provider setup handler.

Symbols

class LlamaCppSetup — Handler for configuring Llama-cpp local model providers.

LlamaCppSetup

Handler for configuring Llama-cpp local model providers.

This class manages the discovery of local directories containing GGUF model files, allowing Yera to locate and load local LLMs from common installation paths or user-defined locations.

Methods

detect_config — Detect and report accessible llama.cpp model directories.
ask_for_config — Interactively prompts the user to define local model directories.
validate — Validate and report recoverable llama.cpp directory problems.

LlamaCppSetup.detect_config

detect_config() → LlamaCppConnection | None

Detect and report accessible llama.cpp model directories.

Returns

type: LlamaCppConnection | None

A connection containing detected model directories, or None when no conventional directory is currently accessible.

LlamaCppSetup.ask_for_config

ask_for_config() → LlamaCppConnection | None

Interactively prompts the user to define local model directories.

Displays currently detected paths and enters a loop allowing the user to manually add additional directories. Paths are expanded (e.g., ~) and resolved to absolute paths before being saved.

Returns

type: LlamaCppConnection | None

A LlamaCppConnection instance containing the union of detected and manually added directories, or None if the user declines.

LlamaCppSetup.validate

validate(
    config: LlamaCppConnection,
) → None

Validate and report recoverable llama.cpp directory problems.

Parameters

config
type: LlamaCppConnection

llama.cpp connection containing model directory paths.