a digital entity named phi that roams bsky
at 88bdcec5a6cd31bf44eb1c73bb2bfa5c3e530ae0 35 lines 869 B view raw
1"""Test search functionality""" 2 3import asyncio 4from bot.tools.google_search import GoogleSearchTool 5from bot.config import settings 6 7 8async def test_search(): 9 """Test Google search tool""" 10 if not settings.google_api_key: 11 print("❌ No Google API key configured") 12 print(" Add GOOGLE_API_KEY and GOOGLE_SEARCH_ENGINE_ID to .env") 13 return 14 15 search = GoogleSearchTool() 16 17 queries = [ 18 "integrated information theory consciousness", 19 "latest AI research 2025", 20 "Bluesky AT Protocol", 21 ] 22 23 for query in queries: 24 print(f"\nSearching for: {query}") 25 print("-" * 50) 26 27 results = await search.search(query) 28 if results: 29 print(search.format_results(results)) 30 else: 31 print("No results found") 32 33 34if __name__ == "__main__": 35 asyncio.run(test_search())