Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -633,7 +633,7 @@ If you find any "Code-Blocks" then,
|
|
633 |
)
|
634 |
try:
|
635 |
correction_response = agent_json_resolver.invoke({"messages": [{"role": "user", "content": correction_prompt}]})
|
636 |
-
corrected_output = extract_json_from_llm_response(correction_response[
|
637 |
#block_relationships = corrected_output.get("block_relationships", [])
|
638 |
result = corrected_output
|
639 |
print(f"result:\n\n {result}")
|
@@ -942,8 +942,8 @@ Each plan must include a **single Scratch Hat Block** (e.g., 'event_whenflagclic
|
|
942 |
"Corrected JSON:\n"
|
943 |
)
|
944 |
correction_response = agent_json_resolver.invoke({"messages": [{"role": "user", "content": correction_prompt}]})
|
945 |
-
print(f"[JSON CORRECTOR RESPONSE AT OVERALLPLANNERNODE ]: {correction_response[
|
946 |
-
overall_plan= extract_json_from_llm_response(correction_response[
|
947 |
|
948 |
state["action_plan"] = overall_plan
|
949 |
logger.info("Overall plan generated by OverallPlannerNode.")
|
@@ -1245,7 +1245,7 @@ Use sprite names exactly as provided in `sprite_names` (e.g., 'Sprite1', 'soccer
|
|
1245 |
"Corrected JSON:\n"
|
1246 |
)
|
1247 |
correction_response = agent_json_resolver.invoke({"messages": [{"role": "user", "content": correction_prompt}]})
|
1248 |
-
print(f"[JSON CORRECTOR RESPONSE AT REFINEPLANNER ]: {correction_response[
|
1249 |
refined_plan = extract_json_from_llm_response(correction_response["messages"][-1].content)#strip_noise(correction_response["messages"][-1].content))
|
1250 |
logger.info("Refined plan corrected by JSON resolver agent.")
|
1251 |
|
|
|
633 |
)
|
634 |
try:
|
635 |
correction_response = agent_json_resolver.invoke({"messages": [{"role": "user", "content": correction_prompt}]})
|
636 |
+
corrected_output = extract_json_from_llm_response(correction_response['messages'][-1].content)
|
637 |
#block_relationships = corrected_output.get("block_relationships", [])
|
638 |
result = corrected_output
|
639 |
print(f"result:\n\n {result}")
|
|
|
942 |
"Corrected JSON:\n"
|
943 |
)
|
944 |
correction_response = agent_json_resolver.invoke({"messages": [{"role": "user", "content": correction_prompt}]})
|
945 |
+
print(f"[JSON CORRECTOR RESPONSE AT OVERALLPLANNERNODE ]: {correction_response['messages'][-1].content}")
|
946 |
+
overall_plan= extract_json_from_llm_response(correction_response['messages'][-1].content)#strip_noise(correction_response["messages"][-1].content))
|
947 |
|
948 |
state["action_plan"] = overall_plan
|
949 |
logger.info("Overall plan generated by OverallPlannerNode.")
|
|
|
1245 |
"Corrected JSON:\n"
|
1246 |
)
|
1247 |
correction_response = agent_json_resolver.invoke({"messages": [{"role": "user", "content": correction_prompt}]})
|
1248 |
+
print(f"[JSON CORRECTOR RESPONSE AT REFINEPLANNER ]: {correction_response['messages'][-1].content}")
|
1249 |
refined_plan = extract_json_from_llm_response(correction_response["messages"][-1].content)#strip_noise(correction_response["messages"][-1].content))
|
1250 |
logger.info("Refined plan corrected by JSON resolver agent.")
|
1251 |
|