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.
()
| 461 | |
| 462 | |
| 463 | def 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 | |
| 481 | def get_docker_api_url(): |
no test coverage detected