def check_if_running(process_name): if process_name.lower() == "ollama": try: response = requests.get( "http://127.0.0.1:11434/api/tags", timeout=5 ) return response.status_code == 200 except requests.exceptions.RequestException: return False return False ollama_running = check_if_running("ollama") if not ollama_running: print("Ollama is not running.") print("ollama_running:", ollama_running) __ __