mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-27 15:54:48 +08:00
fix: fix the bug introduced by coordinator messages update
This commit is contained in:
@@ -243,16 +243,12 @@ def coordinator_node(
|
|||||||
"Coordinator response contains no tool calls. Terminating workflow execution."
|
"Coordinator response contains no tool calls. Terminating workflow execution."
|
||||||
)
|
)
|
||||||
logger.debug(f"Coordinator response: {response}")
|
logger.debug(f"Coordinator response: {response}")
|
||||||
old_messages = state.get("messages", [])
|
messages = state.get("messages", [])
|
||||||
new_messages = old_messages + [
|
if response.content:
|
||||||
{
|
messages.append(HumanMessage(content=response.content, name="coordinator"))
|
||||||
"role": "assistant",
|
|
||||||
"content": response.content,
|
|
||||||
}
|
|
||||||
]
|
|
||||||
return Command(
|
return Command(
|
||||||
update={
|
update={
|
||||||
"messages": new_messages,
|
"messages": messages,
|
||||||
"locale": locale,
|
"locale": locale,
|
||||||
"research_topic": research_topic,
|
"research_topic": research_topic,
|
||||||
"resources": configurable.resources,
|
"resources": configurable.resources,
|
||||||
|
|||||||
Reference in New Issue
Block a user