Skip to main content
Glama
test_fallback.pyβ€’1.08 kB
#!/usr/bin/env python3 """Test fallback search system.""" import os import sys sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..')) from src.websearch.core.search import search_web_fallback, search_web def test_fallback_system(): """Test both fallback and original search systems.""" # Check API keys from environment if not os.getenv("BRAVE_SEARCH_API_KEY"): print("❌ BRAVE_SEARCH_API_KEY environment variable not set") return print("πŸ” Testing Fallback Search System...") # Test fallback search (3 engines with fallbacks) print("\n=== FALLBACK SEARCH (3 engines) ===") fallback_results = search_web_fallback("python programming", 5) print("Fallback search completed") # Test original search (5 engines) print("\n=== ORIGINAL SEARCH (5 engines) ===") original_results = search_web("python programming", 5) print("Original search completed") print("\nβœ… Both systems working - backward compatibility maintained!") if __name__ == "__main__": test_fallback_system()

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/vishalkg/web-search'

If you have feedback or need assistance with the MCP directory API, please join our Discord server