Spaces:
Runtime error
Runtime error
Download agentTest.py from MeghanaNanuvala/Final_Assignment_Template: direct link, hf CLI and curl.
- Browser
- Download file 483 Bytes
-
https://huggingface.co/spaces/MeghanaNanuvala/Final_Assignment_Template/resolve/main/agentTest.py
- Command line
-
hf download hf://spaces/MeghanaNanuvala/Final_Assignment_Template/agentTest.py
-
curl -L -o agentTest.py https://huggingface.co/spaces/MeghanaNanuvala/Final_Assignment_Template/resolve/main/agentTest.py
483 Bytes
| from langchain_core.messages import HumanMessage | |
| from agents.agent import build_graph | |
| # test | |
| if __name__ == "__main__": | |
| question = "When was a picture of St. Thomas Aquinas first added to the Wikipedia page on the Principle of double effect?" | |
| # Build the graph | |
| graph = build_graph() | |
| # Run the graph | |
| messages = [HumanMessage(content=question)] | |
| messages = graph.invoke({"messages": messages}) | |
| for m in messages["messages"]: | |
| m.pretty_print() | |