#!/usr/bin/env python3 """Quick test of the full notification pipeline.""" import asyncio from config import Config from template_manager import TemplateManager from ollama_client import OllamaClient from notification_client import NotificationClient async def test_full_pipeline(): """Test the complete pipeline from template to notification.""" config = Config() print("🚀 Testing full notification pipeline...") # Test template system template_manager = TemplateManager() prompt = template_manager.get_random_prompt() print(f"📋 Selected template: {prompt}") # Test Ollama response async with OllamaClient(config) as ollama_client: strip_think_tags = getattr(config, 'strip_think_tags', True) response = await ollama_client.generate_response(prompt, strip_think_tags=strip_think_tags) if response: print(f"🤖 Ollama response: {response[:200]}...") # Test notification (will skip if no device key/topic) async with NotificationClient(config) as notification_client: success = await notification_client.send_notification(response) if success: print("✅ Notification pipeline working!") else: print("⚠️ Notification sent to available services") else: print("❌ Failed to get Ollama response") if __name__ == "__main__": asyncio.run(test_full_pipeline())