Spaces:
Configuration error
Configuration error
Download test_agent.py from atejandro/agents-course-final-assignment: direct link, hf CLI and curl.
- Browser
- Download file 893 Bytes
-
https://huggingface.co/spaces/atejandro/agents-course-final-assignment/resolve/main/test_agent.py
- Command line
-
hf download hf://spaces/atejandro/agents-course-final-assignment/test_agent.py
-
curl -L -o test_agent.py https://huggingface.co/spaces/atejandro/agents-course-final-assignment/resolve/main/test_agent.py
893 Bytes
| #!/usr/bin/env python3 | |
| """ | |
| Test script for the BasicAgent | |
| """ | |
| import sys | |
| import os | |
| from dotenv import load_dotenv | |
| # Load environment variables from .env file | |
| load_dotenv() | |
| # Add the project root to the Python path | |
| sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) | |
| from src.agent.basic_agent import BasicAgent | |
| agent = BasicAgent() | |
| graph = agent.graph | |
| def main(): | |
| print("Testing BasicAgent...") | |
| # Create the agent | |
| agent = BasicAgent() | |
| # Run the agent | |
| answer = agent("On June 6, 2023, an article by Carolyn Collins Petersen was published in Universe Today. This article mentions a team that produced a paper about their observations, linked at the bottom of the article. Find this paper. Under what NASA award number was the work performed by R. G. Arendt supported by?") | |
| print(f"Final answer: {answer}") | |
| if __name__ == "__main__": | |
| main() |