#!/usr/bin/env python3 """ Test simple del cliente HuggingChat """ import sys import os from pathlib import Path # Agregamos el directorio src al path project_root = Path(__file__).parent src_path = project_root / "src" sys.path.insert(0, str(src_path)) def test_client(): try: print("πŸ”§ Importando HuggingChatClient...") from huggingchat_client import HuggingChatClient print("πŸ”§ Inicializando cliente...") client = HuggingChatClient() print("πŸ“€ Enviando mensaje de prueba...") response = client.send_message("Hola, responde solo 'Funcionando' para confirmar que todo estΓ‘ bien") print(f"πŸ“₯ Respuesta recibida: {response}") print("βœ… Test completado exitosamente!") return True except Exception as e: print(f"❌ Error en el test: {e}") return False if __name__ == "__main__": success = test_client() sys.exit(0 if success else 1)