Files
ARC/backend/app/services/workflow_service.py

11 lines
367 B
Python
Raw Normal View History

2026-06-12 18:16:58 +02:00
from app.graph.workflow import compiled_graph
2026-06-16 11:27:41 +02:00
async def run_arc_workflow(state_data: dict) -> dict:
"""
Prend le state actuel (provenant de l'API/Chainlit),
exécute le graphe jusqu'au prochain point d'arrêt (END),
et retourne le state mis à jour.
"""
final_state = await compiled_graph.ainvoke(state_data)
return dict(final_state)