generated agent-1

This commit is contained in:
Dobromir Popov
2024-03-22 17:38:43 +02:00
parent 9373d2ba3f
commit 90f4537a4c
24 changed files with 155 additions and 37 deletions

View File

@ -11,6 +11,8 @@ class Neo4jConnection:
# Create the schema
self.create_schema()
self.test_retrieval()
# Close the connection
self.close()
@ -21,6 +23,11 @@ class Neo4jConnection:
with self.driver.session() as session:
session.write_transaction(self._create_constraints_and_indexes)
def test_retrieval(tx):
#run MATCH (n) RETURN n LIMIT 25
result = tx.run("MATCH (n) RETURN n LIMIT 25;")
@staticmethod
def _create_constraints_and_indexes(tx):
# Constraints and indexes for Person

View File

@ -1,10 +1,3 @@
class Person:
def __init__(self, person_id, name, age):
self.person_id = person_id
self.name = name
self.age = age
class Memory:
def __init__(self, memory_id, content, timestamp, importance, relevance, associated_tags):
self.memory_id = memory_id