MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / get_ollama_model

Function get_ollama_model

web/pgadmin/llm/utils.py:463–478  ·  view source on GitHub ↗

Get the Ollama model to use. Checks user preferences first, then falls back to system configuration. Returns: The model name string, or empty string if not configured.

()

Source from the content-addressed store, hash-verified

461
462
463def get_ollama_model():
464 """
465 Get the Ollama model to use.
466
467 Checks user preferences first, then falls back to system configuration.
468
469 Returns:
470 The model name string, or empty string if not configured.
471 """
472 # Check user preference first
473 pref_model = _get_preference_value('ollama_api_model')
474 if pref_model:
475 return pref_model
476
477 # Fall back to system configuration
478 return config.OLLAMA_API_MODEL or ''
479
480
481def get_docker_api_url():

Callers 3

get_llm_clientFunction · 0.90
get_llm_statusFunction · 0.90
get_llm_configFunction · 0.85

Calls 1

_get_preference_valueFunction · 0.85

Tested by

no test coverage detected