samoye16 commited on
Commit
6e804c1
·
verified ·
1 Parent(s): 9258ac0

Update agents.py

Browse files
Files changed (1) hide show
  1. agents.py +12 -1
agents.py CHANGED
@@ -132,4 +132,15 @@ def create_agent_flow(provider: str = "groq"):
132
  graph.add_conditional_edges("assistant", tools_condition)
133
  graph.add_edge("tools", "assistant")
134
 
135
- return graph.compile()
 
 
 
 
 
 
 
 
 
 
 
 
132
  graph.add_conditional_edges("assistant", tools_condition)
133
  graph.add_edge("tools", "assistant")
134
 
135
+ return graph.compile()
136
+
137
+
138
+ if __name__ == "__main__":
139
+ question = "What is the capital of France?"
140
+ # Build the graph
141
+ graph = create_agent_flow(provider="groq")
142
+ # Run the graph
143
+ messages = [HumanMessage(content=question)]
144
+ messages = graph.invoke({"messages": messages})
145
+ for m in messages["messages"]:
146
+ m.pretty_print()