mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
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:
parent
03e6a1a6e7
commit
a7315b46df
@ -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"])
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user