Very good tutorial!
However, the current answer does not use the dialogue history. The get_memory function is defined, so an answer using this would be better.
In this page (Adding the Neo4j Vector Retriever - Neo4j & LLM Fundamentals)
Like this,
prompt = ChatPromptTemplate.from_messages(
[
(
"system",
"You are a movie expert. You find movies from a genre or plot.",
),
MessagesPlaceholder(variable_name="chat_history"),
("human", "{input}"),
]
)
Sorry if the dialogue history can be kept without using MessagesPlaceholder.