From 9b9fe48843c53b91be7463c14e50259141dbdd27 Mon Sep 17 00:00:00 2001 From: Igor Ilic <30923996+dexters1@users.noreply.github.com> Date: Mon, 17 Mar 2025 14:58:03 +0100 Subject: [PATCH] chore: Temporarily remove embedding env vars for code graph action (#647) ## Description Temporarily remove embedding env variables for code graph action so the action can run ## DCO Affirmation I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin ## Summary by CodeRabbit - **Chores** - Removed legacy secret configuration from the testing workflow to streamline the CI process and enhance maintainability. - **Improvements** - Updated the argument name in the code graph pipeline for clarity. - Enhanced the handling of results in the example script to support asynchronous processing. --- .github/workflows/test_code_graph_example.yml | 4 ---- cognee/api/v1/cognify/code_graph_pipeline.py | 2 +- examples/python/code_graph_example.py | 6 +++++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/test_code_graph_example.yml b/.github/workflows/test_code_graph_example.yml index 0d6555890..47c36c467 100644 --- a/.github/workflows/test_code_graph_example.yml +++ b/.github/workflows/test_code_graph_example.yml @@ -19,9 +19,5 @@ jobs: secrets: OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} LLM_API_KEY: ${{ secrets.OPENAI_API_KEY }} - EMBEDDING_PROVIDER: "fastembed" - EMBEDDING_MODEL: "sentence-transformers/all-MiniLM-L6-v2" - EMBEDDING_DIMENSIONS: 384 - EMBEDDING_MAX_TOKENS: 256 GRAPHISTRY_USERNAME: ${{ secrets.GRAPHISTRY_USERNAME }} GRAPHISTRY_PASSWORD: ${{ secrets.GRAPHISTRY_PASSWORD }} diff --git a/cognee/api/v1/cognify/code_graph_pipeline.py b/cognee/api/v1/cognify/code_graph_pipeline.py index 27a40628d..a61717dfc 100644 --- a/cognee/api/v1/cognify/code_graph_pipeline.py +++ b/cognee/api/v1/cognify/code_graph_pipeline.py @@ -61,7 +61,7 @@ async def run_code_graph_pipeline(repo_path, include_docs=False): Task(ingest_data, dataset_name="repo_docs", user=user), Task(get_data_list_for_user, dataset_name="repo_docs", user=user), Task(classify_documents), - Task(extract_chunks_from_documents, max_chunk_tokens=get_max_chunk_tokens()), + Task(extract_chunks_from_documents, max_chunk_size=get_max_chunk_tokens()), Task( extract_graph_from_data, graph_model=KnowledgeGraph, task_config={"batch_size": 50} ), diff --git a/examples/python/code_graph_example.py b/examples/python/code_graph_example.py index 25dc5cfd5..e1651400c 100644 --- a/examples/python/code_graph_example.py +++ b/examples/python/code_graph_example.py @@ -7,7 +7,11 @@ from cognee.shared.utils import setup_logging async def main(repo_path, include_docs): - return await run_code_graph_pipeline(repo_path, include_docs) + run_status = False + async for run_status in run_code_graph_pipeline(repo_path, include_docs=include_docs): + run_status = run_status + + return run_status def parse_args():