#!/usr/bin/env python3 import sys sys.path.append('.') print("🌟 Quick Test: Indian News System 🌟\n") try: from plugins_func.functions.get_indian_news_api import SAMPLE_INDIAN_NEWS print(f"āœ… Indian news module loaded successfully") print(f"šŸ“° Sample news available: {len(SAMPLE_INDIAN_NEWS)} items") print(f"šŸ“„ First news: {SAMPLE_INDIAN_NEWS[0]['title']}") print(f"šŸ“ŗ Source: {SAMPLE_INDIAN_NEWS[0]['source']}") print(f"šŸ·ļø Category: {SAMPLE_INDIAN_NEWS[0]['category']}") print("\nšŸŽÆ Configuration Status:") # Check config import yaml with open('data/.config.yaml', 'r') as f: config = yaml.safe_load(f) functions = config.get('Intent', {}).get( 'function_call', {}).get('functions', []) print(f"āœ… Enabled functions: {', '.join(functions)}") if 'get_indian_news_api' in functions: print("āœ… Indian news API is enabled in configuration") else: print("āŒ Indian news API not found in configuration") print("\nšŸš€ System Ready!") print("Your Xiaozhi server now supports Indian news queries!") except Exception as e: print(f"āŒ Error: {e}") import traceback traceback.print_exc()