Spaces:
Running
Running
Update nodes.py
Browse files
nodes.py
CHANGED
|
@@ -523,10 +523,15 @@ EXPLANATION:
|
|
| 523 |
"review": "Polished and explained"
|
| 524 |
}
|
| 525 |
|
|
|
|
| 526 |
# βββββββββββββββββββββββββββββββββββββββββ
|
| 527 |
# NODE 13 β EXPLAINER (passthrough)
|
| 528 |
# βββββββββββββββββββββββββββββββββββββββββ
|
| 529 |
def explainer(state: State):
|
| 530 |
-
|
|
|
|
| 531 |
return {"explanation": "Code completed successfully. See final code above."}
|
| 532 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 523 |
"review": "Polished and explained"
|
| 524 |
}
|
| 525 |
|
| 526 |
+
|
| 527 |
# βββββββββββββββββββββββββββββββββββββββββ
|
| 528 |
# NODE 13 β EXPLAINER (passthrough)
|
| 529 |
# βββββββββββββββββββββββββββββββββββββββββ
|
| 530 |
def explainer(state: State):
|
| 531 |
+
explanation = state.get("explanation")
|
| 532 |
+
if not explanation:
|
| 533 |
return {"explanation": "Code completed successfully. See final code above."}
|
| 534 |
+
|
| 535 |
+
# LangGraph requires a state update.
|
| 536 |
+
# Re-writing the existing explanation satisfies this rule.
|
| 537 |
+
return {"explanation": explanation}
|