From ebabae0308b468230b791e3ba06ed99a1837d554 Mon Sep 17 00:00:00 2001 From: Boris Arzentar Date: Mon, 27 May 2024 08:49:22 +0200 Subject: [PATCH] fix: remove manual lancedb folder creation --- cognee-frontend/package-lock.json | 10 +++++----- cognee-frontend/package.json | 2 +- cognee/api/v1/cognify/cognify.py | 3 ++- cognee/api/v1/prune/prune.py | 2 -- .../databases/vector/create_vector_engine.py | 4 ++-- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/cognee-frontend/package-lock.json b/cognee-frontend/package-lock.json index b60eca154..e5f0987cf 100644 --- a/cognee-frontend/package-lock.json +++ b/cognee-frontend/package-lock.json @@ -10,7 +10,7 @@ "dependencies": { "classnames": "^2.5.1", "next": "14.2.3", - "ohmy-ui": "^0.0.3", + "ohmy-ui": "^0.0.4", "react": "^18", "react-dom": "^18", "uuid": "^9.0.1" @@ -25,7 +25,7 @@ "typescript": "^5" } }, - "../../../Guerrilla/ohmy-ui": { + "../Guerrilla/ohmy-ui": { "version": "0.0.3", "extraneous": true, "license": "MIT", @@ -2892,9 +2892,9 @@ } }, "node_modules/ohmy-ui": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/ohmy-ui/-/ohmy-ui-0.0.3.tgz", - "integrity": "sha512-GXtTZxbL+sXdlT26+mcSrqvUPUIWNUiZOtKT+0lxK6DglGezB0Y/NVQHBcsoPCzmXHY3wi4UBaCH6//8DjHKXA==", + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/ohmy-ui/-/ohmy-ui-0.0.4.tgz", + "integrity": "sha512-E4xgoDutgXptXGmtSFnRwMcvpQ1/r6N5Vzua0a4sq8koFzt2FJuhuf/+o4WjABEi3UPvOpaLdy3/jKn9cFG9yg==", "dependencies": { "classnames": "^2.3.2" }, diff --git a/cognee-frontend/package.json b/cognee-frontend/package.json index 4c8dfdc91..5b7576ba5 100644 --- a/cognee-frontend/package.json +++ b/cognee-frontend/package.json @@ -11,7 +11,7 @@ "dependencies": { "classnames": "^2.5.1", "next": "14.2.3", - "ohmy-ui": "^0.0.3", + "ohmy-ui": "^0.0.4", "react": "^18", "react-dom": "^18", "uuid": "^9.0.1" diff --git a/cognee/api/v1/cognify/cognify.py b/cognee/api/v1/cognify/cognify.py index 8026e578a..bfcda2601 100644 --- a/cognee/api/v1/cognify/cognify.py +++ b/cognee/api/v1/cognify/cognify.py @@ -85,7 +85,8 @@ async def cognify(datasets: Union[str, List[str]] = None): logger.error(f"Dataset {dataset_name} is already being processed.") return - update_task_status(dataset_name, "DATASET_PROCESSING_STARTED") + update_task_status(dataset_name, "DATASET_PROCESSING_STARTED") + await cognify(dataset_name) update_task_status(dataset_name, "DATASET_PROCESSING_FINISHED") diff --git a/cognee/api/v1/prune/prune.py b/cognee/api/v1/prune/prune.py index de52497a3..9b286f8bf 100644 --- a/cognee/api/v1/prune/prune.py +++ b/cognee/api/v1/prune/prune.py @@ -16,8 +16,6 @@ class prune(): @staticmethod async def prune_system(graph = True, vector = True): - infra_config = infrastructure_config.get_config() - if graph: graph_client = await get_graph_client(graph_config.graph_engine) await graph_client.delete_graph() diff --git a/cognee/infrastructure/databases/vector/create_vector_engine.py b/cognee/infrastructure/databases/vector/create_vector_engine.py index b41767f85..6788ae818 100644 --- a/cognee/infrastructure/databases/vector/create_vector_engine.py +++ b/cognee/infrastructure/databases/vector/create_vector_engine.py @@ -28,9 +28,9 @@ def create_vector_engine(config: VectorConfig, embedding_engine): ) else: from .lancedb.LanceDBAdapter import LanceDBAdapter - from cognee.infrastructure.files.storage import LocalStorage + # from cognee.infrastructure.files.storage import LocalStorage - LocalStorage.ensure_directory_exists(config["vector_db_url"]) + # LocalStorage.ensure_directory_exists(config["vector_db_url"]) return LanceDBAdapter( url = config["vector_db_url"],