Skip to content

Commit bd6c50d

Browse files
ryan-gzryan-gz
andauthored
feat:Strip code blocks in plan data. (bytedance#738)
* feat:Strip code blocks in plan data. * feat: add repair_json_output for current_plan_content --------- Co-authored-by: ryan-gz <ryzhangga1991@gmail.com>
1 parent c36ab39 commit bd6c50d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/graph/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ def human_feedback_node(
468468
# increment the plan iterations
469469
plan_iterations += 1
470470
# parse the plan
471-
new_plan = json.loads(current_plan_content)
471+
new_plan = json.loads(repair_json_output(current_plan_content))
472472
# Validate and fix plan to ensure web search requirements are met
473473
configurable = Configuration.from_runnable_config(config)
474474
new_plan = validate_and_fix_plan(new_plan, configurable.enforce_web_search)
@@ -1233,4 +1233,4 @@ async def analyst_node(
12331233
config,
12341234
"analyst",
12351235
[], # No tools - pure reasoning
1236-
)
1236+
)

0 commit comments

Comments
 (0)