BUG: `retrieve_episodes` always return no results
What you were trying to do when you encountered the bug
I have populated the graph database through adding new episodes. I have confirmed that the relevant nodes and edges are successfully create. So, i attempted to fetch the recent few episodes through retrieve_episodes. See code block:
episodes = await graphiti.retrieve_episodes(
reference_time=datetime.now(),
group_ids=[group_id],
)
What you expected to happen
Return the last_n episodic nodes.
What actually happened No episodic nodes returned.
A code sample or test case that demonstrates the issue
episodes = await graphiti.retrieve_episodes(
reference_time=datetime.now(),
group_ids=[group_id],
)
episodes shows an empty list.
I already have the solution at hand.
On line: https://github.com/getzep/graphiti/blob/main/graphiti_core/utils/maintenance/graph_data_operations.py#L143
Simple change $reference_time to datetime($reference_time) would fix the issue.
I already have the solution at hand. On line: https://github.com/getzep/graphiti/blob/main/graphiti_core/utils/maintenance/graph_data_operations.py#L143 Simple change
$reference_timetodatetime($reference_time)would fix the issue.
Why not PR it if it's a fix?
Have you confirmed that you are using the correct group_id?
datetime($reference_time) is not required as Neo4j does an implicit conversion.
@prasmussen15 Yes, I am using the correct group_id.
@zshaoz Is this still an issue? Please confirm within 14 days or this issue will be closed.
@zshaoz Is this still an issue? Please confirm within 14 days or this issue will be closed.
@zshaoz Is this still an issue? Please confirm within 14 days or this issue will be closed.
@zshaoz Is this still an issue? Please confirm within 14 days or this issue will be closed.