localvectordb_server.utils.checkdeps module
localvectordb_server/utils/checkdeps.py Utility functions for checking system dependencies.
- localvectordb_server.utils.checkdeps.check_ollama_installation() str | None
Check if Ollama is installed and available in the system path.
- Returns:
Version string if Ollama is installed, None otherwise
- Return type:
Optional[str]
- Raises:
OllamaNotFoundError – If Ollama is not installed or not accessible
- localvectordb_server.utils.checkdeps.check_ollama_service(base_url: str | None = None, timeout: float = 5.0, retries: int = 3) bool
Check if Ollama service is running and responding.
- Parameters:
base_url (Optional[str]) – Ollama server URL. Defaults to the
OLLAMA_URLenvironment variable orhttp://127.0.0.1:11434. (127.0.0.1 rather than localhost: on Windows, “localhost” resolves to ::1 first and stalls ~2.5s per request because Ollama only listens on IPv4.)timeout (float) – Per-request timeout in seconds.
retries (int) – Number of attempts before giving up.
- Returns:
True if service is running, False otherwise
- Return type: