fix: fix the coordinator's forgetting of its own messages. (#433)
This commit is contained in:
parent
774473cc18
commit
c89b35805d
|
|
@ -243,9 +243,16 @@ 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", [])
|
||||||
|
new_messages = old_messages + [
|
||||||
|
{
|
||||||
|
"role": "assistant",
|
||||||
|
"content": response.content,
|
||||||
|
}
|
||||||
|
]
|
||||||
return Command(
|
return Command(
|
||||||
update={
|
update={
|
||||||
|
"messages": new_messages,
|
||||||
"locale": locale,
|
"locale": locale,
|
||||||
"research_topic": research_topic,
|
"research_topic": research_topic,
|
||||||
"resources": configurable.resources,
|
"resources": configurable.resources,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue