diff --git a/.coderabbit.yaml b/.coderabbit.yaml index 0cad35c84..38cd529ee 100644 --- a/.coderabbit.yaml +++ b/.coderabbit.yaml @@ -3,7 +3,7 @@ language: en early_access: false enable_free_tier: true -reviews: +reviews: profile: chill instructions: >- # Code Review Instructions @@ -118,10 +118,10 @@ reviews: - E117 - D208 line_length: 100 - dummy_variable_rgx: '^(_.*|junk|extra)$' # Variables starting with '_' or named 'junk' or 'extras', are considered dummy variables + dummy_variable_rgx: '^(_.*|junk|extra)$' # Variables starting with '_' or named 'junk' or 'extras', are considered dummy variables markdownlint: enabled: true yamllint: enabled: true chat: - auto_reply: true \ No newline at end of file + auto_reply: true diff --git a/.gitguardian.yml b/.gitguardian.yml index 5a5808340..f84e8ce15 100644 --- a/.gitguardian.yml +++ b/.gitguardian.yml @@ -28,4 +28,4 @@ secret-scan: - path: 'docker-compose.yml' comment: 'Development docker compose with test credentials (neo4j/pleaseletmein, postgres cognee/cognee)' - path: 'deployment/helm/docker-compose-helm.yml' - comment: 'Helm deployment docker compose with test postgres credentials (cognee/cognee)' \ No newline at end of file + comment: 'Helm deployment docker compose with test postgres credentials (cognee/cognee)' diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 5a6d7b124..115553f69 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -8,7 +8,7 @@ body: attributes: value: | Thanks for taking the time to fill out this bug report! Please provide a clear and detailed description. - + - type: textarea id: description attributes: @@ -17,7 +17,7 @@ body: placeholder: Describe the bug in detail... validations: required: true - + - type: textarea id: reproduction attributes: @@ -29,7 +29,7 @@ body: 3. See error... validations: required: true - + - type: textarea id: expected attributes: @@ -38,7 +38,7 @@ body: placeholder: Describe what you expected... validations: required: true - + - type: textarea id: actual attributes: @@ -47,7 +47,7 @@ body: placeholder: Describe what actually happened... validations: required: true - + - type: textarea id: environment attributes: @@ -61,7 +61,7 @@ body: - Database: [e.g. Neo4j] validations: required: true - + - type: textarea id: logs attributes: @@ -71,7 +71,7 @@ body: render: shell validations: required: false - + - type: textarea id: additional attributes: @@ -80,7 +80,7 @@ body: placeholder: Any additional information... validations: required: false - + - type: checkboxes id: checklist attributes: diff --git a/.github/ISSUE_TEMPLATE/documentation.yml b/.github/ISSUE_TEMPLATE/documentation.yml index b01459ac6..546634aac 100644 --- a/.github/ISSUE_TEMPLATE/documentation.yml +++ b/.github/ISSUE_TEMPLATE/documentation.yml @@ -8,7 +8,7 @@ body: attributes: value: | Thanks for helping improve our documentation! Please provide details about the documentation issue or improvement. - + - type: dropdown id: doc-type attributes: @@ -22,7 +22,7 @@ body: - New documentation request validations: required: true - + - type: textarea id: location attributes: @@ -31,7 +31,7 @@ body: placeholder: https://cognee.ai/docs/... or specific file/section validations: required: true - + - type: textarea id: issue attributes: @@ -40,7 +40,7 @@ body: placeholder: The documentation is unclear about... validations: required: true - + - type: textarea id: suggestion attributes: @@ -49,7 +49,7 @@ body: placeholder: I suggest changing this to... validations: required: false - + - type: textarea id: additional attributes: @@ -58,7 +58,7 @@ body: placeholder: Additional context... validations: required: false - + - type: checkboxes id: checklist attributes: @@ -71,4 +71,3 @@ body: required: true - label: I have specified the location of the documentation issue required: true - diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml index cf743e6e4..d7bfdf902 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yml +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -8,7 +8,7 @@ body: attributes: value: | Thanks for suggesting a new feature! Please provide a clear and detailed description of your idea. - + - type: textarea id: problem attributes: @@ -17,7 +17,7 @@ body: placeholder: I'm always frustrated when... validations: required: true - + - type: textarea id: solution attributes: @@ -26,7 +26,7 @@ body: placeholder: I would like to see... validations: required: true - + - type: textarea id: alternatives attributes: @@ -35,7 +35,7 @@ body: placeholder: I have also considered... validations: required: false - + - type: textarea id: use-case attributes: @@ -44,7 +44,7 @@ body: placeholder: This feature would help me... validations: required: true - + - type: textarea id: implementation attributes: @@ -53,7 +53,7 @@ body: placeholder: This could be implemented by... validations: required: false - + - type: textarea id: additional attributes: @@ -62,7 +62,7 @@ body: placeholder: Additional context... validations: required: false - + - type: checkboxes id: checklist attributes: @@ -75,4 +75,3 @@ body: required: true - label: I have described my specific use case required: true - diff --git a/.github/actions/setup_neo4j/action.yml b/.github/actions/setup_neo4j/action.yml index 20b7726b1..8685efc61 100644 --- a/.github/actions/setup_neo4j/action.yml +++ b/.github/actions/setup_neo4j/action.yml @@ -34,14 +34,14 @@ runs: -e NEO4J_apoc_export_file_enabled=true \ -e NEO4J_apoc_import_file_enabled=true \ neo4j:${{ inputs.neo4j-version }} - + - name: Wait for Neo4j to be ready shell: bash run: | echo "Waiting for Neo4j to start..." timeout=60 counter=0 - + while [ $counter -lt $timeout ]; do if docker exec neo4j-test cypher-shell -u neo4j -p "${{ inputs.neo4j-password }}" "RETURN 1" > /dev/null 2>&1; then echo "Neo4j is ready!" @@ -51,13 +51,13 @@ runs: sleep 2 counter=$((counter + 2)) done - + if [ $counter -ge $timeout ]; then echo "Neo4j failed to start within $timeout seconds" docker logs neo4j-test exit 1 fi - + - name: Verify GDS is available shell: bash run: | diff --git a/.github/core-team.txt b/.github/core-team.txt index 2e69a268c..ce8d83e87 100644 --- a/.github/core-team.txt +++ b/.github/core-team.txt @@ -8,5 +8,3 @@ lxobr pazone siillee vasilije1990 - - diff --git a/.github/release-drafter.yml b/.github/release-drafter.yml index 8acf0a601..1df30ce66 100644 --- a/.github/release-drafter.yml +++ b/.github/release-drafter.yml @@ -3,7 +3,7 @@ tag-template: 'v$NEXT_PATCH_VERSION' categories: - title: 'Features' - labels: ['feature', 'enhancement'] + labels: ['feature', 'enhancement'] - title: 'Bug Fixes' labels: ['bug', 'fix'] - title: 'Maintenance' diff --git a/.github/workflows/disable_independent_workflows.sh b/.github/workflows/disable_independent_workflows.sh index ff57da80d..042ce2b82 100755 --- a/.github/workflows/disable_independent_workflows.sh +++ b/.github/workflows/disable_independent_workflows.sh @@ -31,54 +31,54 @@ WORKFLOWS=( for workflow in "${WORKFLOWS[@]}"; do if [ -f "$workflow" ]; then echo "Processing $workflow..." - + # Create a backup cp "$workflow" "${workflow}.bak" - + # Check if the file begins with a workflow_call trigger if grep -q "workflow_call:" "$workflow"; then echo "$workflow already has workflow_call trigger, skipping..." continue fi - + # Get the content after the 'on:' section on_line=$(grep -n "^on:" "$workflow" | cut -d ':' -f1) - + if [ -z "$on_line" ]; then echo "Warning: No 'on:' section found in $workflow, skipping..." continue fi - + # Create a new file with the modified content { # Copy the part before 'on:' head -n $((on_line-1)) "$workflow" - + # Add the new on: section that only includes workflow_call echo "on:" echo " workflow_call:" echo " secrets:" echo " inherit: true" - + # Find where to continue after the original 'on:' section next_section=$(awk "NR > $on_line && /^[a-z]/ {print NR; exit}" "$workflow") - + if [ -z "$next_section" ]; then next_section=$(wc -l < "$workflow") next_section=$((next_section+1)) fi - + # Copy the rest of the file starting from the next section tail -n +$next_section "$workflow" } > "${workflow}.new" - + # Replace the original with the new version mv "${workflow}.new" "$workflow" - + echo "Modified $workflow to only run when called from test-suites.yml" else echo "Warning: $workflow not found, skipping..." fi done -echo "Finished modifying workflows!" \ No newline at end of file +echo "Finished modifying workflows!" diff --git a/.github/workflows/dockerhub.yml b/.github/workflows/dockerhub.yml index 8ed7e802a..107272852 100644 --- a/.github/workflows/dockerhub.yml +++ b/.github/workflows/dockerhub.yml @@ -45,4 +45,4 @@ jobs: cache-to: type=registry,ref=cognee/cognee:buildcache,mode=max - name: Image digest - run: echo ${{ steps.build.outputs.digest }} \ No newline at end of file + run: echo ${{ steps.build.outputs.digest }} diff --git a/.github/workflows/label-core-team.yml b/.github/workflows/label-core-team.yml index 8e32923d1..869f48247 100644 --- a/.github/workflows/label-core-team.yml +++ b/.github/workflows/label-core-team.yml @@ -72,5 +72,3 @@ jobs: } catch (error) { core.warning(`Failed to add label: ${error.message}`); } - - diff --git a/.github/workflows/load_tests.yml b/.github/workflows/load_tests.yml index f5b64d8ce..7e81179a6 100644 --- a/.github/workflows/load_tests.yml +++ b/.github/workflows/load_tests.yml @@ -66,5 +66,3 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_DEV_USER_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_DEV_USER_SECRET_KEY }} run: uv run python ./cognee/tests/test_load.py - - diff --git a/.github/workflows/pre_test.yml b/.github/workflows/pre_test.yml index e15173cb4..115313eac 100644 --- a/.github/workflows/pre_test.yml +++ b/.github/workflows/pre_test.yml @@ -17,6 +17,6 @@ jobs: uses: astral-sh/setup-uv@v4 with: enable-cache: true - + - name: Validate uv lockfile and project metadata run: uv lock --check || { echo "'uv lock --check' failed."; echo "Run 'uv lock' and push your changes."; exit 1; } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 26ccce1f0..f594b4c5a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,10 +42,10 @@ jobs: echo "tag=${TAG}" >> "$GITHUB_OUTPUT" echo "version=${VERSION}" >> "$GITHUB_OUTPUT" - + git tag "${TAG}" git push origin "${TAG}" - + - name: Create GitHub Release uses: softprops/action-gh-release@v2 @@ -54,8 +54,8 @@ jobs: generate_release_notes: true env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - release-pypi-package: + + release-pypi-package: needs: release-github name: Release PyPI Package from ${{ inputs.flavour }} permissions: @@ -67,25 +67,25 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ inputs.flavour }} - + - name: Install uv uses: astral-sh/setup-uv@v7 - + - name: Install Python run: uv python install - + - name: Install dependencies run: uv sync --locked --all-extras - + - name: Build distributions run: uv build - + - name: Publish ${{ inputs.flavour }} release to PyPI env: UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }} run: uv publish - - release-docker-image: + + release-docker-image: needs: release-github name: Release Docker Image from ${{ inputs.flavour }} permissions: @@ -128,7 +128,7 @@ jobs: context: . platforms: linux/amd64,linux/arm64 push: true - tags: | + tags: | cognee/cognee:${{ needs.release-github.outputs.version }} cognee/cognee:latest labels: | @@ -163,4 +163,4 @@ jobs: -H "Authorization: Bearer ${{ secrets.REPO_DISPATCH_PAT_TOKEN }}" \ -H "X-GitHub-Api-Version: 2022-11-28" \ https://api.github.com/repos/topoteretes/cognee-community/dispatches \ - -d '{"event_type":"new-main-release","client_payload":{"caller_repo":"'"${GITHUB_REPOSITORY}"'"}}' \ No newline at end of file + -d '{"event_type":"new-main-release","client_payload":{"caller_repo":"'"${GITHUB_REPOSITORY}"'"}}' diff --git a/.github/workflows/release_test.yml b/.github/workflows/release_test.yml index b31b431a4..9797c1e2d 100644 --- a/.github/workflows/release_test.yml +++ b/.github/workflows/release_test.yml @@ -15,4 +15,3 @@ jobs: name: Load Tests uses: ./.github/workflows/load_tests.yml secrets: inherit - diff --git a/.github/workflows/test_different_operating_systems.yml b/.github/workflows/test_different_operating_systems.yml index 02651b474..5a08ba6a0 100644 --- a/.github/workflows/test_different_operating_systems.yml +++ b/.github/workflows/test_different_operating_systems.yml @@ -10,7 +10,7 @@ on: required: false type: string default: '["3.10.x", "3.12.x", "3.13.x"]' - os: + os: required: false type: string default: '["ubuntu-22.04", "macos-15", "windows-latest"]' diff --git a/.github/workflows/test_llms.yml b/.github/workflows/test_llms.yml index 8f9d30d10..245406172 100644 --- a/.github/workflows/test_llms.yml +++ b/.github/workflows/test_llms.yml @@ -173,4 +173,4 @@ jobs: EMBEDDING_MODEL: "amazon.titan-embed-text-v2:0" EMBEDDING_DIMENSIONS: "1024" EMBEDDING_MAX_TOKENS: "8191" - run: uv run python ./examples/python/simple_example.py \ No newline at end of file + run: uv run python ./examples/python/simple_example.py diff --git a/.github/workflows/test_suites.yml b/.github/workflows/test_suites.yml index 27f4508e0..a1e3ff9e6 100644 --- a/.github/workflows/test_suites.yml +++ b/.github/workflows/test_suites.yml @@ -18,11 +18,11 @@ env: RUNTIME__LOG_LEVEL: ERROR ENV: 'dev' -jobs: +jobs: pre-test: name: basic checks uses: ./.github/workflows/pre_test.yml - + basic-tests: name: Basic Tests uses: ./.github/workflows/basic_tests.yml diff --git a/.mergify.yml b/.mergify.yml index 55a2c4345..c8aef74bf 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -6,4 +6,4 @@ pull_request_rules: actions: backport: branches: - - main \ No newline at end of file + - main diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 54d0a7d94..40a577496 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -7,6 +7,7 @@ repos: - id: trailing-whitespace - id: end-of-file-fixer - id: check-yaml + exclude: ^deployment/helm/templates/ - id: check-added-large-files - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. diff --git a/AGENTS.md b/AGENTS.md index 4cadfbdc1..2a8b7af76 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -128,5 +128,3 @@ MCP server and Frontend: ## CI Mirrors Local Commands Our GitHub Actions run the same ruff checks and pytest suites shown above (`.github/workflows/basic_tests.yml` and related workflows). Use the commands in this document locally to minimize CI surprises. - - diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 87e3dc91c..2e8ed4aa9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,16 +1,16 @@ > [!IMPORTANT] > **Note for contributors:** When branching out, create a new branch from the `dev` branch. -# 🎉 Welcome to **cognee**! +# 🎉 Welcome to **cognee**! -We're excited that you're interested in contributing to our project! -We want to ensure that every user and contributor feels welcome, included and supported to participate in cognee community. +We're excited that you're interested in contributing to our project! +We want to ensure that every user and contributor feels welcome, included and supported to participate in cognee community. This guide will help you get started and ensure your contributions can be efficiently integrated into the project. ## 🌟 Quick Links - [Code of Conduct](CODE_OF_CONDUCT.md) -- [Discord Community](https://discord.gg/bcy8xFAtfd) +- [Discord Community](https://discord.gg/bcy8xFAtfd) - [Issue Tracker](https://github.com/topoteretes/cognee/issues) - [Cognee Docs](https://docs.cognee.ai) @@ -106,7 +106,7 @@ Make sure to run ```shell uv sync ``` in the root cloned folder or set up a virt ```shell python cognee/cognee/examples/python/simple_example.py ``` -or +or ```shell uv run python cognee/cognee/examples/python/simple_example.py diff --git a/README.md b/README.md index 9fd5635ae..ebcaa414f 100644 --- a/README.md +++ b/README.md @@ -65,12 +65,12 @@ Use your data to build personalized and dynamic memory for AI Agents. Cognee let ## About Cognee -Cognee is an open-source tool and platform that transforms your raw data into persistent and dynamic AI memory for Agents. It combines vector search with graph databases to make your documents both searchable by meaning and connected by relationships. +Cognee is an open-source tool and platform that transforms your raw data into persistent and dynamic AI memory for Agents. It combines vector search with graph databases to make your documents both searchable by meaning and connected by relationships. You can use Cognee in two ways: 1. [Self-host Cognee Open Source](https://docs.cognee.ai/getting-started/installation), which stores all data locally by default. -2. [Connect to Cognee Cloud](https://platform.cognee.ai/), and get the same OSS stack on managed infrastructure for easier development and productionization. +2. [Connect to Cognee Cloud](https://platform.cognee.ai/), and get the same OSS stack on managed infrastructure for easier development and productionization. ### Cognee Open Source (self-hosted): @@ -81,8 +81,8 @@ You can use Cognee in two ways: - Offers high customizability through user-defined tasks, modular pipelines, and built-in search endpoints ### Cognee Cloud (managed): -- Hosted web UI dashboard -- Automatic version updates +- Hosted web UI dashboard +- Automatic version updates - Resource usage analytics - GDPR compliant, enterprise-grade security @@ -119,7 +119,7 @@ To integrate other LLM providers, see our [LLM Provider Documentation](https://d ### Step 3: Run the Pipeline -Cognee will take your documents, generate a knowledge graph from them and then query the graph based on combined relationships. +Cognee will take your documents, generate a knowledge graph from them and then query the graph based on combined relationships. Now, run a minimal pipeline: @@ -157,7 +157,7 @@ As you can see, the output is generated from the document we previously stored i Cognee turns documents into AI memory. ``` -### Use the Cognee CLI +### Use the Cognee CLI As an alternative, you can get started with these essential commands: diff --git a/alembic/README b/alembic/README index e0d0858f2..a23d4fb51 100644 --- a/alembic/README +++ b/alembic/README @@ -1 +1 @@ -Generic single-database configuration with an async dbapi. \ No newline at end of file +Generic single-database configuration with an async dbapi. diff --git a/assets/community/README.pt.md b/assets/community/README.pt.md index f42f8c0b0..3a089e3e1 100644 --- a/assets/community/README.pt.md +++ b/assets/community/README.pt.md @@ -43,10 +43,10 @@ Saiba mais sobre os [casos de uso](https://docs.cognee.ai/use-cases) e [avaliaç ## Funcionalidades -- Conecte e recupere suas conversas passadas, documentos, imagens e transcrições de áudio -- Reduza alucinações, esforço de desenvolvimento e custos -- Carregue dados em bancos de dados de grafos e vetores usando apenas Pydantic -- Transforme e organize seus dados enquanto os coleta de mais de 30 fontes diferentes +- Conecte e recupere suas conversas passadas, documentos, imagens e transcrições de áudio +- Reduza alucinações, esforço de desenvolvimento e custos +- Carregue dados em bancos de dados de grafos e vetores usando apenas Pydantic +- Transforme e organize seus dados enquanto os coleta de mais de 30 fontes diferentes ## Primeiros Passos @@ -108,7 +108,7 @@ if __name__ == '__main__': Exemplo do output: ``` O Processamento de Linguagem Natural (NLP) é um campo interdisciplinar e transdisciplinar que envolve ciência da computação e recuperação de informações. Ele se concentra na interação entre computadores e a linguagem humana, permitindo que as máquinas compreendam e processem a linguagem natural. - + ``` Visualização do grafo: diff --git a/assets/community/README.ru.md b/assets/community/README.ru.md index c5a7b4a48..8e7a98479 100644 --- a/assets/community/README.ru.md +++ b/assets/community/README.ru.md @@ -141,7 +141,7 @@ if __name__ == '__main__': 2. Простая демонстрация GraphRAG [Видео](https://github.com/user-attachments/assets/d80b0776-4eb9-4b8e-aa22-3691e2d44b8f) -3. Cognee с Ollama +3. Cognee с Ollama [Видео](https://github.com/user-attachments/assets/8621d3e8-ecb8-4860-afb2-5594f2ee17db) ## Правила поведения diff --git a/assets/community/README.zh.md b/assets/community/README.zh.md index 573a77b31..e002b1f22 100644 --- a/assets/community/README.zh.md +++ b/assets/community/README.zh.md @@ -114,7 +114,7 @@ if __name__ == '__main__': 示例输出: ``` 自然语言处理(NLP)是计算机科学和信息检索的跨学科领域。它关注计算机和人类语言之间的交互,使机器能够理解和处理自然语言。 - + ``` 图形可视化: 图形可视化 diff --git a/cognee-frontend/package.json b/cognee-frontend/package.json index 525dbb61e..bc19f515b 100644 --- a/cognee-frontend/package.json +++ b/cognee-frontend/package.json @@ -34,4 +34,4 @@ "tailwindcss": "^4.1.7", "typescript": "^5" } -} \ No newline at end of file +} diff --git a/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx b/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx index 3efdb47af..597978953 100644 --- a/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx +++ b/cognee-frontend/src/app/(graph)/CogneeAddWidget.tsx @@ -55,7 +55,7 @@ export default function CogneeAddWidget({ onData, useCloud = false }: CogneeAddW setTrue: setProcessingFilesInProgress, setFalse: setProcessingFilesDone, } = useBoolean(false); - + const handleAddFiles = (dataset: Dataset, event: ChangeEvent) => { event.stopPropagation(); diff --git a/cognee-frontend/src/app/(graph)/GraphControls.tsx b/cognee-frontend/src/app/(graph)/GraphControls.tsx index e83fb1107..edb8fb5fc 100644 --- a/cognee-frontend/src/app/(graph)/GraphControls.tsx +++ b/cognee-frontend/src/app/(graph)/GraphControls.tsx @@ -111,7 +111,7 @@ export default function GraphControls({ data, isAddNodeFormOpen, onGraphShapeCha const [isAuthShapeChangeEnabled, setIsAuthShapeChangeEnabled] = useState(true); const shapeChangeTimeout = useRef(null); - + useEffect(() => { onGraphShapeChange(DEFAULT_GRAPH_SHAPE); diff --git a/cognee-frontend/src/app/(graph)/GraphVisualization.tsx b/cognee-frontend/src/app/(graph)/GraphVisualization.tsx index db4494d73..23cfab918 100644 --- a/cognee-frontend/src/app/(graph)/GraphVisualization.tsx +++ b/cognee-frontend/src/app/(graph)/GraphVisualization.tsx @@ -57,7 +57,7 @@ export default function GraphVisualization({ ref, data, graphControls, className // Initial size calculation handleResize(); - // ResizeObserver + // ResizeObserver const resizeObserver = new ResizeObserver(() => { handleResize(); }); @@ -216,7 +216,7 @@ export default function GraphVisualization({ ref, data, graphControls, className }, [data, graphRef]); const [graphShape, setGraphShape] = useState(); - + const zoomToFit: ForceGraphMethods["zoomToFit"] = ( durationMs?: number, padding?: number, @@ -227,15 +227,15 @@ export default function GraphVisualization({ ref, data, graphControls, className // eslint-disable-next-line @typescript-eslint/no-explicit-any return undefined as any; } - + return graphRef.current.zoomToFit?.(durationMs, padding, nodeFilter); }; - + useImperativeHandle(ref, () => ({ zoomToFit, setGraphShape, })); - + return (
diff --git a/cognee-frontend/src/app/(graph)/example_data.json b/cognee-frontend/src/app/(graph)/example_data.json index 74095afd6..98f4c5ca4 100644 --- a/cognee-frontend/src/app/(graph)/example_data.json +++ b/cognee-frontend/src/app/(graph)/example_data.json @@ -1373,4 +1373,4 @@ "padding": 20 } } -} \ No newline at end of file +} diff --git a/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx b/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx index 0c764ef92..69cdbc277 100644 --- a/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx +++ b/cognee-frontend/src/app/dashboard/DatasetsAccordion.tsx @@ -134,7 +134,7 @@ export default function DatasetsAccordion({ } = useBoolean(false); const [datasetToRemove, setDatasetToRemove] = useState(null); - + const handleDatasetRemove = (dataset: Dataset) => { setDatasetToRemove(dataset); openRemoveDatasetModal(); diff --git a/cognee-frontend/src/app/plan/Plan.tsx b/cognee-frontend/src/app/plan/Plan.tsx index 3fd181270..8dfcc470f 100644 --- a/cognee-frontend/src/app/plan/Plan.tsx +++ b/cognee-frontend/src/app/plan/Plan.tsx @@ -45,7 +45,7 @@ export default function Plan() {
Affordable and transparent pricing
- +
Basic
diff --git a/cognee-frontend/src/modules/chat/hooks/useChat.ts b/cognee-frontend/src/modules/chat/hooks/useChat.ts index ed5bc4d79..be6ab8e51 100644 --- a/cognee-frontend/src/modules/chat/hooks/useChat.ts +++ b/cognee-frontend/src/modules/chat/hooks/useChat.ts @@ -40,7 +40,7 @@ export default function useChat(dataset: Dataset) { setTrue: disableSearchRun, setFalse: enableSearchRun, } = useBoolean(false); - + const refreshChat = useCallback(async () => { const data = await fetchMessages(); return setMessages(data); diff --git a/cognee-frontend/src/modules/ingestion/useDatasets.ts b/cognee-frontend/src/modules/ingestion/useDatasets.ts index ab8006a9f..9e9cb8fc0 100644 --- a/cognee-frontend/src/modules/ingestion/useDatasets.ts +++ b/cognee-frontend/src/modules/ingestion/useDatasets.ts @@ -46,7 +46,7 @@ function useDatasets(useCloud = false) { // checkDatasetStatuses(datasets); // }, 50000); // }, [fetchDatasetStatuses]); - + // useEffect(() => { // return () => { // if (statusTimeout.current !== null) { diff --git a/cognee-frontend/src/modules/notebooks/createNotebook.ts b/cognee-frontend/src/modules/notebooks/createNotebook.ts index b7c1279ec..270a932ad 100644 --- a/cognee-frontend/src/modules/notebooks/createNotebook.ts +++ b/cognee-frontend/src/modules/notebooks/createNotebook.ts @@ -7,7 +7,7 @@ export default function createNotebook(notebookName: string, instance: CogneeIns headers: { "Content-Type": "application/json", }, - }).then((response: Response) => + }).then((response: Response) => response.ok ? response.json() : Promise.reject(response) ); } diff --git a/cognee-frontend/src/modules/notebooks/getNotebooks.ts b/cognee-frontend/src/modules/notebooks/getNotebooks.ts index 1951012e7..2f6afa817 100644 --- a/cognee-frontend/src/modules/notebooks/getNotebooks.ts +++ b/cognee-frontend/src/modules/notebooks/getNotebooks.ts @@ -6,7 +6,7 @@ export default function getNotebooks(instance: CogneeInstance) { headers: { "Content-Type": "application/json", }, - }).then((response: Response) => + }).then((response: Response) => response.ok ? response.json() : Promise.reject(response) ); } diff --git a/cognee-frontend/src/modules/notebooks/saveNotebook.ts b/cognee-frontend/src/modules/notebooks/saveNotebook.ts index a99ff5be1..58a042300 100644 --- a/cognee-frontend/src/modules/notebooks/saveNotebook.ts +++ b/cognee-frontend/src/modules/notebooks/saveNotebook.ts @@ -7,7 +7,7 @@ export default function saveNotebook(notebookId: string, notebookData: object, i headers: { "Content-Type": "application/json", }, - }).then((response: Response) => + }).then((response: Response) => response.ok ? response.json() : Promise.reject(response) ); } diff --git a/cognee-frontend/src/ui/Icons/GitHubIcon.tsx b/cognee-frontend/src/ui/Icons/GitHubIcon.tsx index 590b2c217..76b34a81f 100644 --- a/cognee-frontend/src/ui/Icons/GitHubIcon.tsx +++ b/cognee-frontend/src/ui/Icons/GitHubIcon.tsx @@ -7,4 +7,4 @@ export default function GitHubIcon({ width = 24, height = 24, color = 'currentCo ); -} \ No newline at end of file +} diff --git a/cognee-frontend/src/ui/Layout/Header.tsx b/cognee-frontend/src/ui/Layout/Header.tsx index 1bc57f699..53f053f2e 100644 --- a/cognee-frontend/src/ui/Layout/Header.tsx +++ b/cognee-frontend/src/ui/Layout/Header.tsx @@ -46,7 +46,7 @@ export default function Header({ user }: HeaderProps) { checkMCPConnection(); const interval = setInterval(checkMCPConnection, 30000); - + return () => clearInterval(interval); }, [setMCPConnected, setMCPDisconnected]); diff --git a/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx b/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx index 8b471dd51..c9a2c328a 100644 --- a/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx +++ b/cognee-frontend/src/ui/Partials/SearchView/SearchView.tsx @@ -90,7 +90,7 @@ export default function SearchView() { scrollToBottom(); setSearchInputValue(""); - + // Pass topK to sendMessage sendMessage(chatInput, searchType, topK) .then(scrollToBottom) @@ -171,4 +171,4 @@ export default function SearchView() {
); -} \ No newline at end of file +} diff --git a/cognee-frontend/src/ui/elements/Modal/index.ts b/cognee-frontend/src/ui/elements/Modal/index.ts index 6386401d6..b4740f10c 100644 --- a/cognee-frontend/src/ui/elements/Modal/index.ts +++ b/cognee-frontend/src/ui/elements/Modal/index.ts @@ -1,3 +1,2 @@ export { default as Modal } from "./Modal"; export { default as useModal } from "./useModal"; - diff --git a/cognee-frontend/src/ui/elements/Notebook/MarkdownPreview.tsx b/cognee-frontend/src/ui/elements/Notebook/MarkdownPreview.tsx index 6ea69bfc6..9e9f82a2e 100644 --- a/cognee-frontend/src/ui/elements/Notebook/MarkdownPreview.tsx +++ b/cognee-frontend/src/ui/elements/Notebook/MarkdownPreview.tsx @@ -74,4 +74,3 @@ function MarkdownPreview({ content, className = "" }: MarkdownPreviewProps) { } export default memo(MarkdownPreview); - diff --git a/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx b/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx index b6b935229..3ddafe728 100644 --- a/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx +++ b/cognee-frontend/src/ui/elements/Notebook/Notebook.tsx @@ -534,7 +534,7 @@ function transformInsightsGraphData(triplets: Triplet[]) { target: string, label: string, } - } = {}; + } = {}; for (const triplet of triplets) { nodes[triplet[0].id] = { diff --git a/cognee-frontend/src/ui/elements/TextArea.tsx b/cognee-frontend/src/ui/elements/TextArea.tsx index 4e8b36457..0a901bcc7 100644 --- a/cognee-frontend/src/ui/elements/TextArea.tsx +++ b/cognee-frontend/src/ui/elements/TextArea.tsx @@ -34,8 +34,8 @@ export default function TextArea({ // Cache maxHeight on first calculation if (maxHeightRef.current === null) { const computedStyle = getComputedStyle(textarea); - maxHeightRef.current = computedStyle.maxHeight === "none" - ? Infinity + maxHeightRef.current = computedStyle.maxHeight === "none" + ? Infinity : parseInt(computedStyle.maxHeight) || Infinity; } diff --git a/cognee-frontend/src/ui/elements/index.ts b/cognee-frontend/src/ui/elements/index.ts index 0133f56f6..73dd661e1 100644 --- a/cognee-frontend/src/ui/elements/index.ts +++ b/cognee-frontend/src/ui/elements/index.ts @@ -10,4 +10,4 @@ export { default as NeutralButton } from "./NeutralButton"; export { default as StatusIndicator } from "./StatusIndicator"; export { default as StatusDot } from "./StatusDot"; export { default as Accordion } from "./Accordion"; -export { default as Notebook } from "./Notebook"; +export { default as Notebook } from "./Notebook"; diff --git a/cognee-frontend/src/utils/fetch.ts b/cognee-frontend/src/utils/fetch.ts index 3159c8426..4e1b40e4b 100644 --- a/cognee-frontend/src/utils/fetch.ts +++ b/cognee-frontend/src/utils/fetch.ts @@ -57,7 +57,7 @@ export default async function fetch(url: string, options: RequestInit = {}, useC new Error("Backend server is not responding. Please check if the server is running.") ); } - + if (error.detail === undefined) { return Promise.reject( new Error("No connection to the server.") @@ -74,7 +74,7 @@ export default async function fetch(url: string, options: RequestInit = {}, useC fetch.checkHealth = async () => { const maxRetries = 5; const retryDelay = 1000; // 1 second - + for (let i = 0; i < maxRetries; i++) { try { const response = await global.fetch(`${backendApiUrl.replace("/api", "")}/health`); @@ -90,7 +90,7 @@ fetch.checkHealth = async () => { await new Promise(resolve => setTimeout(resolve, retryDelay)); } } - + throw new Error("Backend server is not responding after multiple attempts"); }; diff --git a/cognee-mcp/README.md b/cognee-mcp/README.md index ccfd37928..85363b2c6 100644 --- a/cognee-mcp/README.md +++ b/cognee-mcp/README.md @@ -105,14 +105,14 @@ If you'd rather run cognee-mcp in a container, you have two options: ```bash # For HTTP transport (recommended for web deployments) docker run -e TRANSPORT_MODE=http --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main - # For SSE transport + # For SSE transport docker run -e TRANSPORT_MODE=sse --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main # For stdio transport (default) docker run -e TRANSPORT_MODE=stdio --env-file ./.env --rm -it cognee/cognee-mcp:main ``` - + **Installing optional dependencies at runtime:** - + You can install optional dependencies when running the container by setting the `EXTRAS` environment variable: ```bash # Install a single optional dependency group at runtime @@ -122,7 +122,7 @@ If you'd rather run cognee-mcp in a container, you have two options: --env-file ./.env \ -p 8000:8000 \ --rm -it cognee/cognee-mcp:main - + # Install multiple optional dependency groups at runtime (comma-separated) docker run \ -e TRANSPORT_MODE=sse \ @@ -131,7 +131,7 @@ If you'd rather run cognee-mcp in a container, you have two options: -p 8000:8000 \ --rm -it cognee/cognee-mcp:main ``` - + **Available optional dependency groups:** - `aws` - S3 storage support - `postgres` / `postgres-binary` - PostgreSQL database support @@ -160,7 +160,7 @@ If you'd rather run cognee-mcp in a container, you have two options: # With stdio transport (default) docker run -e TRANSPORT_MODE=stdio --env-file ./.env --rm -it cognee/cognee-mcp:main ``` - + **With runtime installation of optional dependencies:** ```bash # Install optional dependencies from Docker Hub image @@ -357,7 +357,7 @@ You can configure both transports simultaneously for testing: "url": "http://localhost:8000/sse" }, "cognee-http": { - "type": "http", + "type": "http", "url": "http://localhost:8000/mcp" } } diff --git a/cognee-mcp/entrypoint.sh b/cognee-mcp/entrypoint.sh index cf7d19f0a..b4df5ba00 100644 --- a/cognee-mcp/entrypoint.sh +++ b/cognee-mcp/entrypoint.sh @@ -7,11 +7,11 @@ echo "Environment: $ENVIRONMENT" # Install optional dependencies if EXTRAS is set if [ -n "$EXTRAS" ]; then echo "Installing optional dependencies: $EXTRAS" - + # Get the cognee version that's currently installed COGNEE_VERSION=$(uv pip show cognee | grep "Version:" | awk '{print $2}') echo "Current cognee version: $COGNEE_VERSION" - + # Build the extras list for cognee IFS=',' read -ra EXTRA_ARRAY <<< "$EXTRAS" # Combine base extras from pyproject.toml with requested extras @@ -28,11 +28,11 @@ if [ -n "$EXTRAS" ]; then fi fi done - + echo "Installing cognee with extras: $ALL_EXTRAS" echo "Running: uv pip install 'cognee[$ALL_EXTRAS]==$COGNEE_VERSION'" uv pip install "cognee[$ALL_EXTRAS]==$COGNEE_VERSION" - + # Verify installation echo "" echo "✓ Optional dependencies installation completed" @@ -93,19 +93,19 @@ if [ -n "$API_URL" ]; then if echo "$API_URL" | grep -q "localhost" || echo "$API_URL" | grep -q "127.0.0.1"; then echo "⚠️ Warning: API_URL contains localhost/127.0.0.1" echo " Original: $API_URL" - + # Try to use host.docker.internal (works on Mac/Windows and recent Linux with Docker Desktop) FIXED_API_URL=$(echo "$API_URL" | sed 's/localhost/host.docker.internal/g' | sed 's/127\.0\.0\.1/host.docker.internal/g') - + echo " Converted to: $FIXED_API_URL" echo " This will work on Mac/Windows/Docker Desktop." echo " On Linux without Docker Desktop, you may need to:" echo " - Use --network host, OR" echo " - Set API_URL=http://172.17.0.1:8000 (Docker bridge IP)" - + API_URL="$FIXED_API_URL" fi - + API_ARGS="--api-url $API_URL" if [ -n "$API_TOKEN" ]; then API_ARGS="$API_ARGS --api-token $API_TOKEN" diff --git a/cognee-starter-kit/.env.template b/cognee-starter-kit/.env.template index 1aefd2739..d895c16ed 100644 --- a/cognee-starter-kit/.env.template +++ b/cognee-starter-kit/.env.template @@ -16,4 +16,4 @@ EMBEDDING_API_VERSION="" GRAPHISTRY_USERNAME="" -GRAPHISTRY_PASSWORD="" \ No newline at end of file +GRAPHISTRY_PASSWORD="" diff --git a/cognee-starter-kit/README.md b/cognee-starter-kit/README.md index 9cdcd5795..e47a1c270 100644 --- a/cognee-starter-kit/README.md +++ b/cognee-starter-kit/README.md @@ -14,7 +14,7 @@ This starter kit is deprecated. Its examples have been integrated into the `/new # Cognee Starter Kit Welcome to the cognee Starter Repo! This repository is designed to help you get started quickly by providing a structured dataset and pre-built data pipelines using cognee to build powerful knowledge graphs. -You can use this repo to ingest, process, and visualize data in minutes. +You can use this repo to ingest, process, and visualize data in minutes. By following this guide, you will: @@ -80,7 +80,7 @@ Custom model uses custom pydantic model for graph extraction. This script catego python src/pipelines/custom-model.py ``` -## Graph preview +## Graph preview cognee provides a visualize_graph function that will render the graph for you. diff --git a/cognee/api/.env.example b/cognee/api/.env.example index 1e06871df..ad08f6e4e 100644 --- a/cognee/api/.env.example +++ b/cognee/api/.env.example @@ -2,4 +2,4 @@ # Example: # CORS_ALLOWED_ORIGINS="https://yourdomain.com,https://another.com" # For local development, you might use: -# CORS_ALLOWED_ORIGINS="http://localhost:3000" \ No newline at end of file +# CORS_ALLOWED_ORIGINS="http://localhost:3000" diff --git a/cognee/api/v1/sync/routers/get_sync_router.py b/cognee/api/v1/sync/routers/get_sync_router.py index a7d466c10..fe974649a 100644 --- a/cognee/api/v1/sync/routers/get_sync_router.py +++ b/cognee/api/v1/sync/routers/get_sync_router.py @@ -71,7 +71,7 @@ def get_sync_router() -> APIRouter: -H "Content-Type: application/json" \\ -H "Cookie: auth_token=your-token" \\ -d '{"dataset_ids": ["123e4567-e89b-12d3-a456-426614174000", "456e7890-e12b-34c5-d678-901234567000"]}' - + # Sync all user datasets (empty request body or null dataset_ids) curl -X POST "http://localhost:8000/api/v1/sync" \\ -H "Content-Type: application/json" \\ @@ -88,7 +88,7 @@ def get_sync_router() -> APIRouter: - **413 Payload Too Large**: Dataset too large for current cloud plan - **429 Too Many Requests**: Rate limit exceeded - ## Notes + ## Notes - Sync operations run in the background - you get an immediate response - Use the returned run_id to track progress (status API coming soon) - Large datasets are automatically chunked for efficient transfer @@ -179,7 +179,7 @@ def get_sync_router() -> APIRouter: ``` ## Example Responses - + **No running syncs:** ```json { diff --git a/cognee/cli/commands/add_command.py b/cognee/cli/commands/add_command.py index e05998ec5..f3eee26a8 100644 --- a/cognee/cli/commands/add_command.py +++ b/cognee/cli/commands/add_command.py @@ -21,7 +21,7 @@ binary streams, then stores them in a specified dataset for further processing. Supported Input Types: - **Text strings**: Direct text content -- **File paths**: Local file paths (absolute paths starting with "/") +- **File paths**: Local file paths (absolute paths starting with "/") - **File URLs**: "file:///absolute/path" or "file://relative/path" - **S3 paths**: "s3://bucket-name/path/to/file" - **Lists**: Multiple files or text strings in a single call diff --git a/cognee/cli/commands/config_command.py b/cognee/cli/commands/config_command.py index 752db6403..a0d18ec7b 100644 --- a/cognee/cli/commands/config_command.py +++ b/cognee/cli/commands/config_command.py @@ -17,7 +17,7 @@ The `cognee config` command allows you to view and modify configuration settings You can: - View all current configuration settings -- Get specific configuration values +- Get specific configuration values - Set configuration values - Unset (reset to default) specific configuration values - Reset all configuration to defaults diff --git a/cognee/infrastructure/databases/hybrid/neptune_analytics/NeptuneAnalyticsAdapter.py b/cognee/infrastructure/databases/hybrid/neptune_analytics/NeptuneAnalyticsAdapter.py index 1e16642b5..72a1fac01 100644 --- a/cognee/infrastructure/databases/hybrid/neptune_analytics/NeptuneAnalyticsAdapter.py +++ b/cognee/infrastructure/databases/hybrid/neptune_analytics/NeptuneAnalyticsAdapter.py @@ -290,7 +290,7 @@ class NeptuneAnalyticsAdapter(NeptuneGraphDB, VectorDBInterface): query_string = f""" CALL neptune.algo.vectors.topKByEmbeddingWithFiltering({{ topK: {limit}, - embedding: {embedding}, + embedding: {embedding}, nodeFilter: {{ equals: {{property: '{self._COLLECTION_PREFIX}', value: '{collection_name}'}} }} }} ) @@ -299,7 +299,7 @@ class NeptuneAnalyticsAdapter(NeptuneGraphDB, VectorDBInterface): if with_vector: query_string += """ - WITH node, score, id(node) as node_id + WITH node, score, id(node) as node_id MATCH (n) WHERE id(n) = id(node) CALL neptune.algo.vectors.get(n) diff --git a/cognee/infrastructure/llm/prompts/extract_query_time.txt b/cognee/infrastructure/llm/prompts/extract_query_time.txt index ce78c3471..b87c845a7 100644 --- a/cognee/infrastructure/llm/prompts/extract_query_time.txt +++ b/cognee/infrastructure/llm/prompts/extract_query_time.txt @@ -10,4 +10,4 @@ Extraction rules: 5. Current-time references ("now", "current", "today"): If the query explicitly refers to the present, set both starts_at and ends_at to now (the ingestion timestamp). 6. "Who is" and "Who was" questions: These imply a general identity or biographical inquiry without a specific temporal scope. Set both starts_at and ends_at to None. 7. Ordering rule: Always ensure the earlier date is assigned to starts_at and the later date to ends_at. -8. No temporal information: If no valid or inferable time reference is found, set both starts_at and ends_at to None. \ No newline at end of file +8. No temporal information: If no valid or inferable time reference is found, set both starts_at and ends_at to None. diff --git a/cognee/infrastructure/llm/prompts/generate_event_entity_prompt.txt b/cognee/infrastructure/llm/prompts/generate_event_entity_prompt.txt index 7a34ef25b..a193dec8d 100644 --- a/cognee/infrastructure/llm/prompts/generate_event_entity_prompt.txt +++ b/cognee/infrastructure/llm/prompts/generate_event_entity_prompt.txt @@ -22,4 +22,4 @@ The `attributes` should be a list of dictionaries, each containing: - Relationships should be technical with one or at most two words. If two words, use underscore camelcase style - Relationships could imply general meaning like: subject, object, participant, recipient, agent, instrument, tool, source, cause, effect, purpose, manner, resource, etc. - You can combine two words to form a relationship name: subject_role, previous_owner, etc. -- Focus on how the entity specifically relates to the event \ No newline at end of file +- Focus on how the entity specifically relates to the event diff --git a/cognee/infrastructure/llm/prompts/generate_event_graph_prompt.txt b/cognee/infrastructure/llm/prompts/generate_event_graph_prompt.txt index c81ae6d3d..c0d64a0ea 100644 --- a/cognee/infrastructure/llm/prompts/generate_event_graph_prompt.txt +++ b/cognee/infrastructure/llm/prompts/generate_event_graph_prompt.txt @@ -27,4 +27,4 @@ class Event(BaseModel): time_from: Optional[Timestamp] = None time_to: Optional[Timestamp] = None location: Optional[str] = None -``` \ No newline at end of file +``` diff --git a/cognee/infrastructure/llm/prompts/search_type_selector_prompt.txt b/cognee/infrastructure/llm/prompts/search_type_selector_prompt.txt index 1a00bce7e..7804a3030 100644 --- a/cognee/infrastructure/llm/prompts/search_type_selector_prompt.txt +++ b/cognee/infrastructure/llm/prompts/search_type_selector_prompt.txt @@ -2,12 +2,12 @@ You are an expert query analyzer for a **GraphRAG system**. Your primary goal is Here are the available `SearchType` tools and their specific functions: -- **`SUMMARIES`**: The `SUMMARIES` search type retrieves summarized information from the knowledge graph. +- **`SUMMARIES`**: The `SUMMARIES` search type retrieves summarized information from the knowledge graph. - **Best for:** + **Best for:** - - Getting concise overviews of topics - - Summarizing large amounts of information + - Getting concise overviews of topics + - Summarizing large amounts of information - Quick understanding of complex subjects **Best for:** @@ -16,7 +16,7 @@ Here are the available `SearchType` tools and their specific functions: - Understanding relationships between concepts - Exploring the structure of your knowledge graph -* **`CHUNKS`**: The `CHUNKS` search type retrieves specific facts and information chunks from the knowledge graph. +* **`CHUNKS`**: The `CHUNKS` search type retrieves specific facts and information chunks from the knowledge graph. **Best for:** @@ -122,4 +122,4 @@ Response: `NATURAL_LANGUAGE` -Your response MUST be a single word, consisting of only the chosen `SearchType` name. Do not provide any explanation. \ No newline at end of file +Your response MUST be a single word, consisting of only the chosen `SearchType` name. Do not provide any explanation. diff --git a/cognee/infrastructure/llm/prompts/test.txt b/cognee/infrastructure/llm/prompts/test.txt index 529a11d86..265acebc7 100644 --- a/cognee/infrastructure/llm/prompts/test.txt +++ b/cognee/infrastructure/llm/prompts/test.txt @@ -1 +1 @@ -Respond with: test \ No newline at end of file +Respond with: test diff --git a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/copilot_conversations.json b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/copilot_conversations.json index 9471928c2..dcab8ddc6 100644 --- a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/copilot_conversations.json +++ b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/copilot_conversations.json @@ -105,4 +105,3 @@ } } } - diff --git a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/guido_contributions.json b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/guido_contributions.json index 918486b8c..6424d7a55 100644 --- a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/guido_contributions.json +++ b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/guido_contributions.json @@ -973,4 +973,4 @@ "python_version": null, "pep_status": null } -] \ No newline at end of file +] diff --git a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/my_developer_rules.md b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/my_developer_rules.md index 18a7ba18d..751fda2bd 100644 --- a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/my_developer_rules.md +++ b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/my_developer_rules.md @@ -76,4 +76,4 @@ Section: Open Questions or TODOs Create a checklist of unresolved decisions, logic that needs clarification, or tasks that are still pending. Section: Last Updated -Include the most recent update date and who made the update. \ No newline at end of file +Include the most recent update date and who made the update. diff --git a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/pep_style_guide.md b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/pep_style_guide.md index 8982d7e81..bc6466324 100644 --- a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/pep_style_guide.md +++ b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/pep_style_guide.md @@ -72,4 +72,3 @@ profile = "black" - E501: line too long -> break with parentheses - E225: missing whitespace around operator - E402: module import not at top of file - diff --git a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/zen_principles.md b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/zen_principles.md index bbcb4e56d..d49dc9c13 100644 --- a/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/zen_principles.md +++ b/cognee/modules/notebooks/tutorials/python-development-with-cognee/data/zen_principles.md @@ -72,4 +72,3 @@ Use modules/packages to separate concerns; avoid wildcard imports. - Is this the simplest working solution? - Are errors explicit and logged? - Are modules/namespaces used appropriately? - diff --git a/cognee/modules/retrieval/__init__.py b/cognee/modules/retrieval/__init__.py index 8b1378917..e69de29bb 100644 --- a/cognee/modules/retrieval/__init__.py +++ b/cognee/modules/retrieval/__init__.py @@ -1 +0,0 @@ - diff --git a/cognee/tasks/temporal_graph/__init__.py b/cognee/tasks/temporal_graph/__init__.py index 8b1378917..e69de29bb 100644 --- a/cognee/tasks/temporal_graph/__init__.py +++ b/cognee/tasks/temporal_graph/__init__.py @@ -1 +0,0 @@ - diff --git a/cognee/tests/test_cleanup_unused_data.py b/cognee/tests/test_cleanup_unused_data.py index fa5c174c2..abb6d8f3e 100644 --- a/cognee/tests/test_cleanup_unused_data.py +++ b/cognee/tests/test_cleanup_unused_data.py @@ -46,10 +46,10 @@ async def test_textdocument_cleanup_with_sql(): # Step 1: Add and cognify a test document dataset_name = "test_cleanup_dataset" - test_text = """ - Machine learning is a subset of artificial intelligence that enables systems to learn - and improve from experience without being explicitly programmed. Deep learning uses - neural networks with multiple layers to process data. + test_text = """ + Machine learning is a subset of artificial intelligence that enables systems to learn + and improve from experience without being explicitly programmed. Deep learning uses + neural networks with multiple layers to process data. """ await setup() diff --git a/cognee/tests/test_delete_by_id.py b/cognee/tests/test_delete_by_id.py index 8fc5395eb..90b2d6b42 100644 --- a/cognee/tests/test_delete_by_id.py +++ b/cognee/tests/test_delete_by_id.py @@ -47,20 +47,20 @@ async def main(): # Test data text_1 = """ - Apple Inc. is an American multinational technology company that specializes in consumer electronics, - software, and online services. Apple is the world's largest technology company by revenue and, + Apple Inc. is an American multinational technology company that specializes in consumer electronics, + software, and online services. Apple is the world's largest technology company by revenue and, since January 2021, the world's most valuable company. """ text_2 = """ - Microsoft Corporation is an American multinational technology corporation which produces computer software, - consumer electronics, personal computers, and related services. Its best known software products are the + Microsoft Corporation is an American multinational technology corporation which produces computer software, + consumer electronics, personal computers, and related services. Its best known software products are the Microsoft Windows line of operating systems and the Microsoft Office suite. """ text_3 = """ - Google LLC is an American multinational technology company that specializes in Internet-related services and products, - which include online advertising technologies, search engine, cloud computing, software, and hardware. Google has been + Google LLC is an American multinational technology company that specializes in Internet-related services and products, + which include online advertising technologies, search engine, cloud computing, software, and hardware. Google has been referred to as the most powerful company in the world and one of the world's most valuable brands. """ diff --git a/deployment/helm/README.md b/deployment/helm/README.md index b7aaa6325..6ee79cc80 100644 --- a/deployment/helm/README.md +++ b/deployment/helm/README.md @@ -19,7 +19,7 @@ Clone the Repository Clone this repository to your local machine and navigate t helm install cognee ./cognee-chart ``` -**Uninstall Helm Release**: +**Uninstall Helm Release**: ```bash helm uninstall cognee ``` diff --git a/deployment/helm/docker-compose-helm.yml b/deployment/helm/docker-compose-helm.yml index 8aaa63816..90c3ca206 100644 --- a/deployment/helm/docker-compose-helm.yml +++ b/deployment/helm/docker-compose-helm.yml @@ -43,4 +43,3 @@ networks: volumes: postgres_data: - diff --git a/deployment/helm/templates/postgres_service.yaml b/deployment/helm/templates/postgres_service.yaml index 7a944a128..c1195fcaa 100644 --- a/deployment/helm/templates/postgres_service.yaml +++ b/deployment/helm/templates/postgres_service.yaml @@ -11,4 +11,3 @@ spec: targetPort: {{ .Values.postgres.port }} selector: app: {{ .Release.Name }}-postgres - diff --git a/evals/requirements.txt b/evals/requirements.txt index cb11af255..97b3ea3e7 100644 --- a/evals/requirements.txt +++ b/evals/requirements.txt @@ -3,4 +3,4 @@ numpy==1.26.4 matplotlib==3.10.0 seaborn==0.13.2 scipy==1.11.4 -pathlib \ No newline at end of file +pathlib diff --git a/examples/data/car_and_tech_companies.txt b/examples/data/car_and_tech_companies.txt index 699f9812d..154232d86 100644 --- a/examples/data/car_and_tech_companies.txt +++ b/examples/data/car_and_tech_companies.txt @@ -34,4 +34,4 @@ What began as an online bookstore has grown into one of the largest e-commerce p Meta, originally known as Facebook, revolutionized social media by connecting billions of people worldwide. Beyond its core social networking service, Meta is investing in the next generation of digital experiences through virtual and augmented reality technologies, with projects like Oculus. The company's efforts signal a commitment to evolving digital interaction and building the metaverse—a shared virtual space where users can connect and collaborate. Each of these companies has significantly impacted the technology landscape, driving innovation and transforming everyday life through their groundbreaking products and services. -""" \ No newline at end of file +""" diff --git a/examples/database_examples/neptune_analytics_example.py b/examples/database_examples/neptune_analytics_example.py index d98d1768c..1c6eb791f 100644 --- a/examples/database_examples/neptune_analytics_example.py +++ b/examples/database_examples/neptune_analytics_example.py @@ -63,10 +63,10 @@ async def main(): traversals. """ - sample_text_2 = """Neptune Analytics is an ideal choice for investigatory, exploratory, or data-science workloads - that require fast iteration for data, analytical and algorithmic processing, or vector search on graph data. It - complements Amazon Neptune Database, a popular managed graph database. To perform intensive analysis, you can load - the data from a Neptune Database graph or snapshot into Neptune Analytics. You can also load graph data that's + sample_text_2 = """Neptune Analytics is an ideal choice for investigatory, exploratory, or data-science workloads + that require fast iteration for data, analytical and algorithmic processing, or vector search on graph data. It + complements Amazon Neptune Database, a popular managed graph database. To perform intensive analysis, you can load + the data from a Neptune Database graph or snapshot into Neptune Analytics. You can also load graph data that's stored in Amazon S3. """ diff --git a/examples/low_level/product_recommendation.py b/examples/low_level/product_recommendation.py index 782311618..142625318 100644 --- a/examples/low_level/product_recommendation.py +++ b/examples/low_level/product_recommendation.py @@ -165,8 +165,8 @@ async def main(): // If a stored preference exists and it does not match the new value, // raise an error using APOC's utility procedure. CALL apoc.util.validate( - preference IS NOT NULL AND preference.value <> new_size, - "Conflicting shoe size preference: existing size is " + preference.value + " and new size is " + new_size, + preference IS NOT NULL AND preference.value <> new_size, + "Conflicting shoe size preference: existing size is " + preference.value + " and new size is " + new_size, [] ) diff --git a/examples/python/temporal_example.py b/examples/python/temporal_example.py index f5e7d4a9a..a647f31be 100644 --- a/examples/python/temporal_example.py +++ b/examples/python/temporal_example.py @@ -35,16 +35,16 @@ biography_1 = """ biography_2 = """ Arnulf Øverland Ole Peter Arnulf Øverland ( 27 April 1889 – 25 March 1968 ) was a Norwegian poet and artist . He is principally known for his poetry which served to inspire the Norwegian resistance movement during the German occupation of Norway during World War II . - + Biography . Øverland was born in Kristiansund and raised in Bergen . His parents were Peter Anton Øverland ( 1852–1906 ) and Hanna Hage ( 1854–1939 ) . The early death of his father , left the family economically stressed . He was able to attend Bergen Cathedral School and in 1904 Kristiania Cathedral School . He graduated in 1907 and for a time studied philology at University of Kristiania . Øverland published his first collection of poems ( 1911 ) . - + Øverland became a communist sympathizer from the early 1920s and became a member of Mot Dag . He also served as chairman of the Norwegian Students Society 1923–28 . He changed his stand in 1937 , partly as an expression of dissent against the ongoing Moscow Trials . He was an avid opponent of Nazism and in 1936 he wrote the poem Du må ikke sove which was printed in the journal Samtiden . It ends with . ( I thought: : Something is imminent . Our era is over – Europe’s on fire! ) . Probably the most famous line of the poem is ( You mustnt endure so well the injustice that doesnt affect you yourself! ) - + During the German occupation of Norway from 1940 in World War II , he wrote to inspire the Norwegian resistance movement . He wrote a series of poems which were clandestinely distributed , leading to the arrest of both him and his future wife Margrete Aamot Øverland in 1941 . Arnulf Øverland was held first in the prison camp of Grini before being transferred to Sachsenhausen concentration camp in Germany . He spent a four-year imprisonment until the liberation of Norway in 1945 . His poems were later collected in Vi overlever alt and published in 1945 . - + Øverland played an important role in the Norwegian language struggle in the post-war era . He became a noted supporter for the conservative written form of Norwegian called Riksmål , he was president of Riksmålsforbundet ( an organization in support of Riksmål ) from 1947 to 1956 . In addition , Øverland adhered to the traditionalist style of writing , criticising modernist poetry on several occasions . His speech Tungetale fra parnasset , published in Arbeiderbladet in 1954 , initiated the so-called Glossolalia debate . - + Personal life . In 1918 he had married the singer Hildur Arntzen ( 1888–1957 ) . Their marriage was dissolved in 1939 . In 1940 , he married Bartholine Eufemia Leganger ( 1903–1995 ) . They separated shortly after , and were officially divorced in 1945 . Øverland was married to journalist Margrete Aamot Øverland ( 1913–1978 ) during June 1945 . In 1946 , the Norwegian Parliament arranged for Arnulf and Margrete Aamot Øverland to reside at the Grotten . He lived there until his death in 1968 and she lived there for another ten years until her death in 1978 . Arnulf Øverland was buried at Vår Frelsers Gravlund in Oslo . Joseph Grimeland designed the bust of Arnulf Øverland ( bronze , 1970 ) at his grave site . @@ -56,7 +56,7 @@ biography_2 = """ - Vi overlever alt ( 1945 ) - Sverdet bak døren ( 1956 ) - Livets minutter ( 1965 ) - + Awards . - Gyldendals Endowment ( 1935 ) - Dobloug Prize ( 1951 ) diff --git a/examples/python/weighted_graph_visualization.html b/examples/python/weighted_graph_visualization.html index 89920a780..3866d8cd6 100644 --- a/examples/python/weighted_graph_visualization.html +++ b/examples/python/weighted_graph_visualization.html @@ -14,7 +14,7 @@ .nodes circle { stroke: white; stroke-width: 0.5px; filter: drop-shadow(0 0 5px rgba(255,255,255,0.3)); } .node-label { font-size: 5px; font-weight: bold; fill: white; text-anchor: middle; dominant-baseline: middle; font-family: 'Inter', sans-serif; pointer-events: none; } .edge-label { font-size: 3px; fill: rgba(255, 255, 255, 0.7); text-anchor: middle; dominant-baseline: middle; font-family: 'Inter', sans-serif; pointer-events: none; } - + .tooltip { position: absolute; text-align: left; @@ -76,7 +76,7 @@ // Create tooltip content for edge var content = "Edge Information
"; content += "Relationship: " + d.relation + "
"; - + // Show all weights if (d.all_weights && Object.keys(d.all_weights).length > 0) { content += "Weights:
"; @@ -86,23 +86,23 @@ } else if (d.weight !== null && d.weight !== undefined) { content += "Weight: " + d.weight + "
"; } - + if (d.relationship_type) { content += "Type: " + d.relationship_type + "
"; } - + // Add other edge properties if (d.edge_info) { Object.keys(d.edge_info).forEach(function(key) { - if (key !== 'weight' && key !== 'weights' && key !== 'relationship_type' && - key !== 'source_node_id' && key !== 'target_node_id' && - key !== 'relationship_name' && key !== 'updated_at' && + if (key !== 'weight' && key !== 'weights' && key !== 'relationship_type' && + key !== 'source_node_id' && key !== 'target_node_id' && + key !== 'relationship_name' && key !== 'updated_at' && !key.startsWith('weight_')) { content += key + ": " + d.edge_info[key] + "
"; } }); } - + tooltip.html(content) .style("left", (d3.event.pageX + 10) + "px") .style("top", (d3.event.pageY - 10) + "px") @@ -209,4 +209,3 @@ - \ No newline at end of file diff --git a/mise.toml b/mise.toml new file mode 100644 index 000000000..c8ddcd4b3 --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +python = "latest" diff --git a/mypy.ini b/mypy.ini index ba3dd40a4..cd0c68752 100644 --- a/mypy.ini +++ b/mypy.ini @@ -118,4 +118,4 @@ ignore_missing_imports = True ignore_missing_imports = True [mypy-pytz.*] -ignore_missing_imports = True \ No newline at end of file +ignore_missing_imports = True diff --git a/new-examples/configurations/database_examples/neptune_analytics_aws_database_configuration.py b/new-examples/configurations/database_examples/neptune_analytics_aws_database_configuration.py index d98d1768c..1c6eb791f 100644 --- a/new-examples/configurations/database_examples/neptune_analytics_aws_database_configuration.py +++ b/new-examples/configurations/database_examples/neptune_analytics_aws_database_configuration.py @@ -63,10 +63,10 @@ async def main(): traversals. """ - sample_text_2 = """Neptune Analytics is an ideal choice for investigatory, exploratory, or data-science workloads - that require fast iteration for data, analytical and algorithmic processing, or vector search on graph data. It - complements Amazon Neptune Database, a popular managed graph database. To perform intensive analysis, you can load - the data from a Neptune Database graph or snapshot into Neptune Analytics. You can also load graph data that's + sample_text_2 = """Neptune Analytics is an ideal choice for investigatory, exploratory, or data-science workloads + that require fast iteration for data, analytical and algorithmic processing, or vector search on graph data. It + complements Amazon Neptune Database, a popular managed graph database. To perform intensive analysis, you can load + the data from a Neptune Database graph or snapshot into Neptune Analytics. You can also load graph data that's stored in Amazon S3. """ diff --git a/new-examples/custom_pipelines/organizational_hierarchy/data/companies.json b/new-examples/custom_pipelines/organizational_hierarchy/data/companies.json index eb2f65089..c402ec802 100644 --- a/new-examples/custom_pipelines/organizational_hierarchy/data/companies.json +++ b/new-examples/custom_pipelines/organizational_hierarchy/data/companies.json @@ -36,4 +36,3 @@ ] } ] - diff --git a/new-examples/custom_pipelines/organizational_hierarchy/data/people.json b/new-examples/custom_pipelines/organizational_hierarchy/data/people.json index 73835e2ff..3474d8794 100644 --- a/new-examples/custom_pipelines/organizational_hierarchy/data/people.json +++ b/new-examples/custom_pipelines/organizational_hierarchy/data/people.json @@ -50,4 +50,3 @@ "department": "HR" } ] - diff --git a/new-examples/custom_pipelines/product_recommendation/data/customers.json b/new-examples/custom_pipelines/product_recommendation/data/customers.json index 61b89b9d0..fa83f011d 100644 --- a/new-examples/custom_pipelines/product_recommendation/data/customers.json +++ b/new-examples/custom_pipelines/product_recommendation/data/customers.json @@ -106,4 +106,3 @@ "action": "purchased" }] }] - diff --git a/new-examples/custom_pipelines/product_recommendation/product_recommendation_example.py b/new-examples/custom_pipelines/product_recommendation/product_recommendation_example.py index 16adbbf3a..33623b052 100644 --- a/new-examples/custom_pipelines/product_recommendation/product_recommendation_example.py +++ b/new-examples/custom_pipelines/product_recommendation/product_recommendation_example.py @@ -165,8 +165,8 @@ async def main(): // If a stored preference exists and it does not match the new value, // raise an error using APOC's utility procedure. CALL apoc.util.validate( - preference IS NOT NULL AND preference.value <> new_size, - "Conflicting shoe size preference: existing size is " + preference.value + " and new size is " + new_size, + preference IS NOT NULL AND preference.value <> new_size, + "Conflicting shoe size preference: existing size is " + preference.value + " and new size is " + new_size, [] ) diff --git a/new-examples/demos/temporal_awareness_example.py b/new-examples/demos/temporal_awareness_example.py index f5e7d4a9a..a647f31be 100644 --- a/new-examples/demos/temporal_awareness_example.py +++ b/new-examples/demos/temporal_awareness_example.py @@ -35,16 +35,16 @@ biography_1 = """ biography_2 = """ Arnulf Øverland Ole Peter Arnulf Øverland ( 27 April 1889 – 25 March 1968 ) was a Norwegian poet and artist . He is principally known for his poetry which served to inspire the Norwegian resistance movement during the German occupation of Norway during World War II . - + Biography . Øverland was born in Kristiansund and raised in Bergen . His parents were Peter Anton Øverland ( 1852–1906 ) and Hanna Hage ( 1854–1939 ) . The early death of his father , left the family economically stressed . He was able to attend Bergen Cathedral School and in 1904 Kristiania Cathedral School . He graduated in 1907 and for a time studied philology at University of Kristiania . Øverland published his first collection of poems ( 1911 ) . - + Øverland became a communist sympathizer from the early 1920s and became a member of Mot Dag . He also served as chairman of the Norwegian Students Society 1923–28 . He changed his stand in 1937 , partly as an expression of dissent against the ongoing Moscow Trials . He was an avid opponent of Nazism and in 1936 he wrote the poem Du må ikke sove which was printed in the journal Samtiden . It ends with . ( I thought: : Something is imminent . Our era is over – Europe’s on fire! ) . Probably the most famous line of the poem is ( You mustnt endure so well the injustice that doesnt affect you yourself! ) - + During the German occupation of Norway from 1940 in World War II , he wrote to inspire the Norwegian resistance movement . He wrote a series of poems which were clandestinely distributed , leading to the arrest of both him and his future wife Margrete Aamot Øverland in 1941 . Arnulf Øverland was held first in the prison camp of Grini before being transferred to Sachsenhausen concentration camp in Germany . He spent a four-year imprisonment until the liberation of Norway in 1945 . His poems were later collected in Vi overlever alt and published in 1945 . - + Øverland played an important role in the Norwegian language struggle in the post-war era . He became a noted supporter for the conservative written form of Norwegian called Riksmål , he was president of Riksmålsforbundet ( an organization in support of Riksmål ) from 1947 to 1956 . In addition , Øverland adhered to the traditionalist style of writing , criticising modernist poetry on several occasions . His speech Tungetale fra parnasset , published in Arbeiderbladet in 1954 , initiated the so-called Glossolalia debate . - + Personal life . In 1918 he had married the singer Hildur Arntzen ( 1888–1957 ) . Their marriage was dissolved in 1939 . In 1940 , he married Bartholine Eufemia Leganger ( 1903–1995 ) . They separated shortly after , and were officially divorced in 1945 . Øverland was married to journalist Margrete Aamot Øverland ( 1913–1978 ) during June 1945 . In 1946 , the Norwegian Parliament arranged for Arnulf and Margrete Aamot Øverland to reside at the Grotten . He lived there until his death in 1968 and she lived there for another ten years until her death in 1978 . Arnulf Øverland was buried at Vår Frelsers Gravlund in Oslo . Joseph Grimeland designed the bust of Arnulf Øverland ( bronze , 1970 ) at his grave site . @@ -56,7 +56,7 @@ biography_2 = """ - Vi overlever alt ( 1945 ) - Sverdet bak døren ( 1956 ) - Livets minutter ( 1965 ) - + Awards . - Gyldendals Endowment ( 1935 ) - Dobloug Prize ( 1951 ) diff --git a/tools/check-package.sh b/tools/check-package.sh index 237ecf2d0..ca3fc1c13 100644 --- a/tools/check-package.sh +++ b/tools/check-package.sh @@ -58,4 +58,3 @@ fi # error in package exit 1 - diff --git a/tools/poetry-deps.sh b/tools/poetry-deps.sh index 17767b3eb..79b0b77d4 100644 --- a/tools/poetry-deps.sh +++ b/tools/poetry-deps.sh @@ -26,4 +26,4 @@ if [ -z $error ]; then fi # error in package -exit 1 \ No newline at end of file +exit 1