Commit
·
b2cd5db
1
Parent(s):
b478018
commit
Browse files- __pycache__/agent.cpython-310.pyc +0 -0
- agent.py +16 -4
__pycache__/agent.cpython-310.pyc
CHANGED
Binary files a/__pycache__/agent.cpython-310.pyc and b/__pycache__/agent.cpython-310.pyc differ
|
|
agent.py
CHANGED
@@ -215,11 +215,23 @@ def build_graph(provider: str = "groq"):
|
|
215 |
if __name__ == "__main__":
|
216 |
question = "When was a picture of St. Thomas Aquinas first added to the Wikipedia page on the Principle of double effect?"
|
217 |
# Build the graph
|
218 |
-
graph = build_graph(provider="huggingface")
|
219 |
# Run the graph
|
220 |
-
|
221 |
-
|
222 |
-
|
|
|
223 |
m.pretty_print()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
|
225 |
|
|
|
215 |
if __name__ == "__main__":
|
216 |
question = "When was a picture of St. Thomas Aquinas first added to the Wikipedia page on the Principle of double effect?"
|
217 |
# Build the graph
|
218 |
+
graph = build_graph(provider="huggingface") # This needs to actually use the provider
|
219 |
# Run the graph
|
220 |
+
initial_messages = [sys_msg, HumanMessage(content=question)] # PREPEND sys_msg HERE
|
221 |
+
|
222 |
+
print("Invoking graph with initial messages:")
|
223 |
+
for m in initial_messages:
|
224 |
m.pretty_print()
|
225 |
+
print("-" * 20)
|
226 |
+
|
227 |
+
result_messages = graph.invoke({"messages": initial_messages})
|
228 |
+
|
229 |
+
print("\nFinal Graph Output:")
|
230 |
+
if result_messages and "messages" in result_messages:
|
231 |
+
for m in result_messages["messages"]:
|
232 |
+
m.pretty_print()
|
233 |
+
else:
|
234 |
+
print("Graph did not return expected messages structure.")
|
235 |
+
print(f"Raw output: {result_messages}")
|
236 |
|
237 |
|