Added a few updates to poetry and tested packages
This commit is contained in:
parent
6fa13a8a9a
commit
7c0a35cc0d
4 changed files with 523 additions and 555 deletions
|
|
@ -199,9 +199,9 @@ class Neo4jGraphDB(AbstractGraphDB):
|
||||||
# Create the user and memory components if they don't exist
|
# Create the user and memory components if they don't exist
|
||||||
user_memory_cypher = f"""
|
user_memory_cypher = f"""
|
||||||
MERGE (user:User {{userId: '{user_id}'}})
|
MERGE (user:User {{userId: '{user_id}'}})
|
||||||
MERGE (semantic:SemanticMemory {{userId: '{user_id}', name: 'SemanticMemory}}')
|
MERGE (semantic:SemanticMemory {{userId: '{user_id}', name: 'SemanticMemory' }})
|
||||||
MERGE (episodic:EpisodicMemory {{userId: '{user_id}', name: 'EpisodicMemory'}})
|
MERGE (episodic:EpisodicMemory {{userId: '{user_id}', name: 'EpisodicMemory'}})
|
||||||
MERGE (buffer:Buffer {{userId: '{user_id}', name: 'Buffer}})
|
MERGE (buffer:Buffer {{userId: '{user_id}', name: 'Buffer' }})
|
||||||
MERGE (user)-[:HAS_SEMANTIC_MEMORY]->(semantic)
|
MERGE (user)-[:HAS_SEMANTIC_MEMORY]->(semantic)
|
||||||
MERGE (user)-[:HAS_EPISODIC_MEMORY]->(episodic)
|
MERGE (user)-[:HAS_EPISODIC_MEMORY]->(episodic)
|
||||||
MERGE (user)-[:HAS_BUFFER]->(buffer)
|
MERGE (user)-[:HAS_BUFFER]->(buffer)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ from cognitive_architecture.database.postgres.database_crud import session_scope
|
||||||
from cognitive_architecture.database.postgres.models.metadatas import MetaDatas
|
from cognitive_architecture.database.postgres.models.metadatas import MetaDatas
|
||||||
from cognitive_architecture.database.postgres.models.docs import DocsModel
|
from cognitive_architecture.database.postgres.models.docs import DocsModel
|
||||||
from cognitive_architecture.database.postgres.models.memory import MemoryModel
|
from cognitive_architecture.database.postgres.models.memory import MemoryModel
|
||||||
from level_4.cognitive_architecture.database.postgres.models.user import User
|
from cognitive_architecture.database.postgres.models.user import User
|
||||||
from cognitive_architecture.classifiers.classifier import classify_call
|
from cognitive_architecture.classifiers.classifier import classify_call
|
||||||
aclient = instructor.patch(OpenAI())
|
aclient = instructor.patch(OpenAI())
|
||||||
DEFAULT_PRESET = "promethai_chat"
|
DEFAULT_PRESET = "promethai_chat"
|
||||||
|
|
@ -470,16 +470,12 @@ async def main():
|
||||||
"strategy": "SUMMARY",
|
"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 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)
|
await add_documents_to_graph_db(session, user_id, loader_settings=loader_settings)
|
||||||
|
|
||||||
ee = await user_context_enrichment(session, user_id, query="Tell me about the book I read yesterday")
|
ee = await user_context_enrichment(session, user_id, query="Tell me about the book I read yesterday")
|
||||||
# memory_instance = Memory(namespace='SEMANTICMEMORY')
|
|
||||||
# sss = await memory_instance.dynamic_method_call(memory_instance.semantic_memory_class, 'fetch_memories', observation='some_observation')
|
|
||||||
|
|
||||||
|
|
||||||
# print(rs)
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
import asyncio
|
import asyncio
|
||||||
|
|
||||||
|
|
|
||||||
1058
level_4/poetry.lock
generated
1058
level_4/poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
|
@ -7,10 +7,10 @@ readme = "README.md"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
python = "^3.10"
|
python = "^3.10"
|
||||||
langchain = "v0.0.308"
|
langchain = "^0.0.338"
|
||||||
|
|
||||||
nltk = "3.8.1"
|
nltk = "3.8.1"
|
||||||
openai = "1.2.4"
|
openai = "1.3.3"
|
||||||
pinecone-client = "2.2.2"
|
pinecone-client = "2.2.2"
|
||||||
python-dotenv = "1.0.0"
|
python-dotenv = "1.0.0"
|
||||||
pyyaml = "6.0"
|
pyyaml = "6.0"
|
||||||
|
|
@ -45,6 +45,8 @@ pdf2image = "^1.16.3"
|
||||||
instructor = "^0.3.4"
|
instructor = "^0.3.4"
|
||||||
networkx = "^3.2.1"
|
networkx = "^3.2.1"
|
||||||
graphviz = "^0.20.1"
|
graphviz = "^0.20.1"
|
||||||
|
greenlet = "^3.0.1"
|
||||||
|
neo4j = "^5.14.1"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue