QuentinL52 commited on
Commit
b339057
·
verified ·
1 Parent(s): dcb1044

Update services/graph_service.py

Browse files
Files changed (1) hide show
  1. services/graph_service.py +6 -1
services/graph_service.py CHANGED
@@ -167,13 +167,16 @@ class GraphInterviewProcessor:
167
  return graph.compile()
168
  '''
169
  def _build_graph(self) -> any:
170
- """Construit et compile le graphe d'états."""
171
  tool_node = ToolNode([trigger_interview_analysis])
 
172
  graph = StateGraph(AgentState)
173
  graph.add_node("agent", self._agent_node)
174
  graph.add_node("tools", tool_node)
175
  graph.add_node("final_tool_node", self._final_analysis_node)
 
176
  graph.set_entry_point("agent")
 
177
  graph.add_conditional_edges(
178
  "agent",
179
  self._router,
@@ -183,8 +186,10 @@ class GraphInterviewProcessor:
183
  "end_turn": END
184
  }
185
  )
 
186
  graph.add_edge("tools", "agent")
187
  graph.add_edge("final_tool_node", END)
 
188
  return graph.compile()
189
 
190
  def invoke(self, messages: List[Dict[str, Any]]):
 
167
  return graph.compile()
168
  '''
169
  def _build_graph(self) -> any:
170
+ """Construit et compile le graphe d'états."""
171
  tool_node = ToolNode([trigger_interview_analysis])
172
+
173
  graph = StateGraph(AgentState)
174
  graph.add_node("agent", self._agent_node)
175
  graph.add_node("tools", tool_node)
176
  graph.add_node("final_tool_node", self._final_analysis_node)
177
+
178
  graph.set_entry_point("agent")
179
+
180
  graph.add_conditional_edges(
181
  "agent",
182
  self._router,
 
186
  "end_turn": END
187
  }
188
  )
189
+
190
  graph.add_edge("tools", "agent")
191
  graph.add_edge("final_tool_node", END)
192
+
193
  return graph.compile()
194
 
195
  def invoke(self, messages: List[Dict[str, Any]]):