You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are no timestamps being written to the Neo4jMessageHistory (neo4j_graphrag.message_history) so it's not really that useful for message analysis, for example it's not easy to query/order recent messages.
There are no timestamps being written to the Neo4jMessageHistory (neo4j_graphrag.message_history) so it's not really that useful for message analysis, for example it's not easy to query/order recent messages.
https://neo4j.com/docs/neo4j-graphrag-python/current/_modules/neo4j_graphrag/message_history.html#Neo4jMessageHistory
Currently:
ADD_MESSAGE_QUERY = ( "MATCH (s:
{node_label}) WHERE s.id = $session_id " "OPTIONAL MATCH (s)-[lm:LAST_MESSAGE]->(last_message) " "CREATE (s)-[:LAST_MESSAGE]->(new:Message) " "SET new += {{role:$role, content:$content}} " "WITH new, lm, last_message WHERE last_message IS NOT NULL " "CREATE (last_message)-[:NEXT]->(new) " "DELETE lm" )
Enhanced:
ADD_MESSAGE_QUERY = ( "MATCH (s:
{node_label}) WHERE s.id = $session_id " "OPTIONAL MATCH (s)-[lm:LAST_MESSAGE]->(last_message) " "CREATE (s)-[:LAST_MESSAGE]->(new:Message) " "SET new += {{role:$role, content:$content, datetime: datetime()}} " "WITH new, lm, last_message WHERE last_message IS NOT NULL " "CREATE (last_message)-[:NEXT]->(new) " "DELETE lm" )
Thanks!
Michael
The text was updated successfully, but these errors were encountered: