Check if Ollama server is running
(self)
| 11 | self.api_url = f"{base_url}/api" |
| 12 | |
| 13 | def is_ollama_running(self) -> bool: |
| 14 | """Check if Ollama server is running""" |
| 15 | try: |
| 16 | response = requests.get(f"{self.base_url}/api/tags", timeout=5) |
| 17 | return response.status_code == 200 |
| 18 | except requests.exceptions.RequestException: |
| 19 | return False |
| 20 | |
| 21 | def list_models(self) -> List[str]: |
| 22 | """Get list of available models""" |
no outgoing calls