Etape 1 OK, sans optionnel

This commit is contained in:
Chevallier
2026-06-16 11:27:41 +02:00
parent a7d8914e25
commit bacfe49578
15 changed files with 765 additions and 51 deletions

View File

@@ -1,6 +1,11 @@
from app.graph.workflow import compiled_graph
async def run_arc_workflow(user_input: str) -> dict:
result = await compiled_graph.ainvoke({"user_input": user_input})
return result
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)