import requests

OLLAMA_API_URL = "http://217.182.105.173:11434/api/tags"

response = requests.get(OLLAMA_API_URL)

if response.status_code == 200:
    models = response.json().get('models', [])
    print("Modèles disponibles via Ollama :")
    for model in models:
        print(f"- {model['name']}")
else:
    print(f"Erreur : {response.status_code} - {response.text}")
