Spaces:
Sleeping
Sleeping
| import os | |
| import sys | |
| from unittest.mock import MagicMock | |
| # Mocking modules | |
| sys.modules['cv2'] = MagicMock() | |
| sys.modules['whisper'] = MagicMock() | |
| # Set dummy env vars | |
| os.environ["OPENROUTER_API_KEY"] = "dummy" | |
| os.environ["GOOGLE_API_KEY"] = "dummy" | |
| os.environ["GROQ_API_KEY"] = "dummy" | |
| os.environ["NVIDIA_API_KEY"] = "dummy" | |
| os.environ["VERCEL_API_KEY"] = "dummy" | |
| sys.path.append(os.getcwd()) | |
| import agent | |
| def verify_tiers(): | |
| from langchain_core.messages import HumanMessage | |
| # We can't easily call smart_invoke without real models unless we mock heavily. | |
| # Let's just check the tiers list structure in a dummy call. | |
| # Actually, we can't easily access 'tiers' inside smart_invoke as it's a local variable. | |
| # Let's check the global model objects. | |
| print(f"NVIDIA model initialized: {agent.nvidia_model is not None}") | |
| print(f"Vercel model initialized: {agent.vercel_model is not None}") | |
| # Check if they have invoke (they should) | |
| print(f"NVIDIA model hasattr invoke: {hasattr(agent.nvidia_model, 'invoke')}") | |
| print(f"Vercel model hasattr invoke: {hasattr(agent.vercel_model, 'invoke')}") | |
| if __name__ == "__main__": | |
| verify_tiers() | |