Skip to content

Commit eb533ef

Browse files
committed
wordaround weird 1st-message bug
1 parent 7b22043 commit eb533ef

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/agent/profiles/react_to_me.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ async def call_model(
4747
result: dict[str, Any] = await self.reactome_rag.ainvoke(
4848
{
4949
"input": state["rephrased_input"],
50-
"chat_history": state["chat_history"],
50+
"chat_history": (
51+
state["chat_history"]
52+
if state["chat_history"]
53+
else [HumanMessage(state["user_input"])]
54+
),
5155
},
5256
config,
5357
)

0 commit comments

Comments
 (0)