chore: adds return value and sets tue entry point kg generation to true
This commit is contained in:
parent
6efe566849
commit
b5d9e7a6d2
2 changed files with 4 additions and 5 deletions
|
|
@ -9,14 +9,12 @@ from cognee.modules.users.permissions.methods import get_document_ids_for_user
|
|||
from cognee.modules.graph.cognee_graph.CogneeGraph import CogneeGraph
|
||||
from cognee.infrastructure.databases.vector import get_vector_engine
|
||||
from cognee.infrastructure.databases.graph import get_graph_engine
|
||||
from openai import organization
|
||||
from sympy.codegen.fnodes import dimension
|
||||
|
||||
|
||||
def format_triplets(edges):
|
||||
print("\n\n\n")
|
||||
def filter_attributes(obj, attributes):
|
||||
"""Helper function to filter out non-None properties, including nested dicts."""
|
||||
print("\n\n\n")
|
||||
result = {}
|
||||
for attr in attributes:
|
||||
value = getattr(obj, attr, None)
|
||||
|
|
@ -115,6 +113,7 @@ async def run_two_step_retriever(query: str, user, community_filter = []) -> lis
|
|||
|
||||
results = await memory_fragment.calculate_top_triplet_importances(k=5)
|
||||
|
||||
|
||||
print(format_triplets(results))
|
||||
print(f'Query was the following:{query}' )
|
||||
|
||||
return results
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ async def main(enable_steps):
|
|||
if __name__ == '__main__':
|
||||
# Flags to enable/disable steps
|
||||
|
||||
rebuild_kg = False
|
||||
rebuild_kg = True
|
||||
retrieve = True
|
||||
steps_to_enable = {
|
||||
"prune_data": rebuild_kg,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue