Added a few updates to poetry and tested packages
This commit is contained in:
parent
7c0a35cc0d
commit
35195f7f6c
2 changed files with 9 additions and 7 deletions
|
|
@ -199,9 +199,9 @@ class Neo4jGraphDB(AbstractGraphDB):
|
|||
# Create the user and memory components if they don't exist
|
||||
user_memory_cypher = f"""
|
||||
MERGE (user:User {{userId: '{user_id}'}})
|
||||
MERGE (semantic:SemanticMemory {{userId: '{user_id}', name: 'SemanticMemory' }})
|
||||
MERGE (episodic:EpisodicMemory {{userId: '{user_id}', name: 'EpisodicMemory'}})
|
||||
MERGE (buffer:Buffer {{userId: '{user_id}', name: 'Buffer' }})
|
||||
MERGE (semantic:SemanticMemory {{name: 'SemanticMemory', userId: '{user_id}' }})
|
||||
MERGE (episodic:EpisodicMemory {{name: 'EpisodicMemory' , userId: '{user_id}'}})
|
||||
MERGE (buffer:Buffer {{name: 'Buffer' , userId: '{user_id}' }})
|
||||
MERGE (user)-[:HAS_SEMANTIC_MEMORY]->(semantic)
|
||||
MERGE (user)-[:HAS_EPISODIC_MEMORY]->(episodic)
|
||||
MERGE (user)-[:HAS_BUFFER]->(buffer)
|
||||
|
|
|
|||
|
|
@ -165,9 +165,11 @@ async def load_documents_to_vectorstore(session: AsyncSession, user_id: str, job
|
|||
namespace_class = namespace_id + "_class"
|
||||
|
||||
logging.info("Namespace created with id %s", namespace_id)
|
||||
|
||||
new_user = User(id=user_id)
|
||||
await add_entity(session, new_user)
|
||||
try:
|
||||
new_user = User(id=user_id)
|
||||
await add_entity(session, new_user)
|
||||
except:
|
||||
pass
|
||||
|
||||
if job_id is None:
|
||||
job_id = str(uuid.uuid4())
|
||||
|
|
@ -469,7 +471,7 @@ async def main():
|
|||
"path": [".data"],
|
||||
"strategy": "SUMMARY",
|
||||
}
|
||||
# await load_documents_to_vectorstore(session, user_id, loader_settings=loader_settings)
|
||||
await load_documents_to_vectorstore(session, user_id, loader_settings=loader_settings)
|
||||
await user_query_to_graph_db(session, user_id, "I walked in the forest yesterday and added to my list I need to buy some milk in the store and get a summary from a classical book i read yesterday")
|
||||
await add_documents_to_graph_db(session, user_id, loader_settings=loader_settings)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue