diff --git a/cognee/infrastructure/databases/exceptions/exceptions.py b/cognee/infrastructure/databases/exceptions/exceptions.py index 854e620ff..f3e945d4e 100644 --- a/cognee/infrastructure/databases/exceptions/exceptions.py +++ b/cognee/infrastructure/databases/exceptions/exceptions.py @@ -11,7 +11,10 @@ class EntityNotFoundError(CogneeApiError): name: str = "EntityNotFoundError", status_code=status.HTTP_404_NOT_FOUND, ): - super().__init__(message, name, status_code) + self.message = message + self.name = name + self.status_code = status_code + # super().__init__(message, name, status_code) :TODO: This is not an error anymore with the dynamic exception handling therefore we shouldn't log error class EntityAlreadyExistsError(CogneeApiError): diff --git a/cognee/modules/graph/cognee_graph/CogneeGraph.py b/cognee/modules/graph/cognee_graph/CogneeGraph.py index 2436529e6..30116002b 100644 --- a/cognee/modules/graph/cognee_graph/CogneeGraph.py +++ b/cognee/modules/graph/cognee_graph/CogneeGraph.py @@ -126,8 +126,6 @@ class CogneeGraph(CogneeAbstractGraph): node = self.get_node(node_id) if node: node.add_attribute("vector_distance", score) - else: - print(f"Node with id {node_id} not found in the graph.") async def map_vector_distances_to_graph_edges(self, vector_engine, query) -> None: try: diff --git a/cognee/tasks/completion/graph_query_completion.py b/cognee/tasks/completion/graph_query_completion.py index a8db96135..e7778ce88 100644 --- a/cognee/tasks/completion/graph_query_completion.py +++ b/cognee/tasks/completion/graph_query_completion.py @@ -1,4 +1,5 @@ from cognee.infrastructure.engine import ExtendableDataPoint +from cognee.infrastructure.engine.models.DataPoint import DataPoint from cognee.modules.graph.utils.convert_node_to_data_point import get_all_subclasses from cognee.tasks.completion.exceptions import NoRelevantDataFound from cognee.infrastructure.llm.get_llm_client import get_llm_client @@ -38,7 +39,7 @@ async def graph_query_completion(query: str, context_resolver: Callable = None) - Ensure that the LLM client and graph database are properly configured and accessible. """ - subclasses = get_all_subclasses(ExtendableDataPoint) + subclasses = get_all_subclasses(DataPoint) vector_index_collections = []