fix: solves the malformed json output and pydantic validation error produced by the 'planner' node by forcing the llm response to strictly comply with the pydantic 'Plan' model (#322)

This commit is contained in:
Tax
2025-06-13 19:13:30 -07:00
committed by GitHub
parent 03e6a1a6e7
commit a7315b46df

View File

@@ -104,7 +104,8 @@ def planner_node(
if AGENT_LLM_MAP["planner"] == "basic":
llm = get_llm_by_type(AGENT_LLM_MAP["planner"]).with_structured_output(
Plan,
method="json_mode",
method="json_schema",
strict=True,
)
else:
llm = get_llm_by_type(AGENT_LLM_MAP["planner"])