Spaces:
Runtime error
Runtime error
| """Local smoke test: verify imports, tools, and a single agent run.""" | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| import os | |
| print("== 1. Token present? ==") | |
| print("HF_TOKEN set:", bool(os.getenv("HF_TOKEN"))) | |
| print("\n== 2. Import tools & agent ==") | |
| from tools import TOOLS, calculator, web_search | |
| from agent import GaiaAgent | |
| print("Tools:", [t.name for t in TOOLS]) | |
| print("\n== 3. calculator tool ==") | |
| print(calculator.invoke({"expression": "(12*7)+3"})) | |
| print("\n== 4. web_search tool ==") | |
| print(web_search.invoke({"query": "capital of France"})[:300]) | |
| print("\n== 5. Build agent ==") | |
| agent = GaiaAgent() | |
| print("Agent built OK") | |
| print("\n== 6. Run one simple question ==") | |
| ans = agent("What is the capital of France? Answer with the city name only.") | |
| print("ANSWER:", repr(ans)) | |
| print("\nSMOKE TEST COMPLETE") | |