pipeworks_mud_mapper.callbacks.ollama_models_callbacks ====================================================== .. py:module:: pipeworks_mud_mapper.callbacks.ollama_models_callbacks .. autoapi-nested-parse:: Callbacks for Ollama model discovery and connectivity. This module focuses on operations that query the Ollama server for model availability and connection status. Keeping these callbacks isolated reduces the size of the main Ollama callback surface. Functions --------- .. autoapisummary:: pipeworks_mud_mapper.callbacks.ollama_models_callbacks.refresh_ollama_models Module Contents --------------- .. py:function:: refresh_ollama_models(n_clicks, server_url) Fetch available models from the Ollama server. Calls the Ollama /api/tags endpoint to retrieve the list of installed models and returns dropdown options plus a connection status message. :param n_clicks: Click count for the refresh button. :type n_clicks: :py:class:`int` :param server_url: Ollama server URL (e.g., http://localhost:11434). :type server_url: :py:class:`str` :returns: (model_options, connection_status, placeholder) - model_options: List of dicts with 'label' and 'value' keys - connection_status: HTML element showing connection state - placeholder: Dropdown placeholder text :rtype: :py:class:`tuple`