Spaces:
Sleeping
Sleeping
Download tests/test_graph_smoke.py from TheJN/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 491 Bytes
-
https://huggingface.co/spaces/TheJN/Final_Assignment_Template/resolve/main/tests/test_graph_smoke.py
- Command line
-
hf download hf://spaces/TheJN/Final_Assignment_Template/tests/test_graph_smoke.py
-
curl -L -o test_graph_smoke.py https://huggingface.co/spaces/TheJN/Final_Assignment_Template/resolve/main/tests/test_graph_smoke.py
491 Bytes
| from langchain_core.messages import AIMessage | |
| from gaia_agent.agent import GaiaAgent | |
| class FakeChatModel: | |
| def invoke(self, messages): | |
| return AIMessage(content="Dummy LLM answer") | |
| def test_agent_returns_llm_answer(): | |
| agent = GaiaAgent(llm=FakeChatModel()) | |
| assert ( | |
| agent( | |
| "What is the answer?", | |
| session_id="test-session", | |
| user_id="test-user", | |
| task_id="test-task", | |
| ) | |
| == "Dummy LLM answer" | |
| ) | |