yera.cli.setup_handlers.ollama
Ollama provider setup handler.
Symbols
OllamaSetup
Inherits:
BaseProviderSetupHandler for configuring Ollama provider connections.
This class manages the setup of the connection to a local or remote Ollama server, primarily focusing on the base URL configuration and connectivity verification.
Methods
detect_config — Detect and report the resolved Ollama connection.
ask_for_config — Interactively prompts the user for the Ollama server URL.
OllamaSetup.detect_config
detect_config() → OllamaConnectionDetect and report the resolved Ollama connection.
Returns
type: OllamaConnection
A normalized connection using the configured host or local default.
Raises
RuntimeError
If provider detection produces no connection.
OllamaSetup.ask_for_config
ask_for_config() → OllamaConnection | NoneInteractively prompts the user for the Ollama server URL.
Returns
type: OllamaConnection | None
An OllamaConnection instance containing the user-provided URL, or None if the user declines the setup.