Commit graph

4833 commits

Author SHA1 Message Date
ketanjain7981
3f53534c99 refactor(database): simplify to env var only for connect_args
- Remove unused connect_args parameter from __init__
- Programmatic parameter was dead code (never called by users)
- Users call get_relational_engine() which doesn't expose connect_args
- Keep DATABASE_CONNECT_ARGS env var support (actually used in production)
- Simplify implementation and reduce complexity
- Update docstring to reflect env-var-only approach
- Add production examples to docstring

Signed-off-by: ketanjain7981 <ketan.jain@think41.com>
2025-12-02 21:12:07 +05:30
Igor Ilic
1282905888 feat: add password encryption for Neo4j 2025-12-02 16:34:16 +01:00
ketanjain7981
c892265644 fix(database): address CodeRabbit review feedback
- Add comprehensive docstring for __init__ method to meet 80% coverage requirement
- Fix security issue: remove sensitive data from log messages
- Fix merge precedence: programmatic args now correctly override env vars
- Fix SQLite timeout order: user-specified timeout now overrides default 30s
- Clarify precedence in docstring documentation

Signed-off-by: ketanjain7981 <ketan.jain@think41.com>
2025-12-02 21:01:43 +05:30
Igor Ilic
2d45db9e0d
Fix distributed issues with latest pydantic version (#1859)
<!-- .github/pull_request_template.md -->

## Description
Resolve distributed issues with poetry lock

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Updated dependency version constraints to improve compatibility and
flexibility with Pydantic and aiofiles packages.
* Removed unused development dependency from the project configuration.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-02 16:08:26 +01:00
ketanjain7981
f9b16e508d feat(database): add connect_args support to SqlAlchemyAdapter
- Add optional connect_args parameter to __init__ method
- Support DATABASE_CONNECT_ARGS environment variable for JSON-based configuration
- Enable custom connection parameters for all database engines (SQLite and PostgreSQL)
- Maintain backward compatibility with existing code
- Add proper error handling and validation for environment variable parsing

Signed-off-by: ketanjain7981 <ketan.jain@think41.com>
2025-12-02 20:30:09 +05:30
Igor Ilic
92448767fe refactor: remove done TODOs 2025-12-02 14:29:51 +01:00
chinu0609
6a4d31356b fix: using graph projection instead of conditions 2025-12-02 18:55:47 +05:30
Igor Ilic
702cdb45be
Merge branch 'dev' into multi-tenant-neo4j 2025-12-02 13:11:37 +01:00
Igor Ilic
dbcb35a6da chore: remove unused imports, add optional for delete dataset statement 2025-12-02 13:09:45 +01:00
Boris Arzentar
0ff836b6dd
fix: install latest nvm version 2025-12-02 10:48:28 +01:00
Boris Arzentar
5fe6a17cfd
fix: resolve nvm when not in path 2025-12-02 10:43:57 +01:00
Boris Arzentar
5ee5ae294a
Merge remote-tracking branch 'origin/dev' into feature/cog-3441-cognee-cli-ui-fix 2025-12-01 20:23:01 +01:00
Andrej Milicevic
d473ef12ae fix: small changes based on PR comments 2025-12-01 18:32:55 +01:00
Igor Ilic
8e67471d1e
Merge branch 'dev' into main-merge-vol4 2025-12-01 17:43:46 +01:00
Vasilije
c17f838034
CI: 32 GB machine for Ollama tests (#1857)
<!-- .github/pull_request_template.md -->

## Description
Recently the Llama test became failing with `model requires more system
memory (8.9 GiB) than is available (8.4 GiB)`. Due to `cgroup`
configuration, only 8 GBs are available for containers running on
`buildjet-4vcpu-ubuntu-2204`.
The decision is to change the the machine to
`buildjet-8vcpu-ubuntu-2204`. it costs 0.0016 $ per minute.

Unconfidently changed the model to `phi3:mini`. Any other ideas are
welcome.
<!--
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [x] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## 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.
2025-12-01 08:01:24 -08:00
Boris
2df84dba27
Merge branch 'dev' into fix/remove-double-quotes-from-llmconfig-str-params 2025-12-01 16:03:00 +01:00
Igor Ilic
5cfc7b1761 chore: Disable backend access control when not supported 2025-12-01 15:58:19 +01:00
Pavel Zorin
e480acaa7c
COG-3437: Chore: CodeRabbit config (#1833)
## Description
Adds `.coderabbit.yml` that tunes CodeRabbit reviews
## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [x] Other (please specify): chore

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## 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.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Chores**
* Added a project-wide review and tooling configuration to standardize
reviews, path-specific guidance, automated incremental reviews, chat
auto-replies, and integrations with linters/validators.
* Configured review behaviors (auto-review, abort-on-close, high-level
summaries, placeholders) and path filtering to focus checks where
needed.

* **Note**
  * No user-visible changes.

<sub>✏️ Tip: You can customize this high-level summary in your review
settings.</sub>
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-12-01 15:29:49 +01:00
Pavel Zorin
ba9ca46574 Increase the machine size 2025-12-01 15:23:59 +01:00
Igor Ilic
362aa8df5c
Merge branch 'main' into baml-rate-limit-handling 2025-12-01 15:12:27 +01:00
Igor Ilic
2e493cea4c chore: Disable multi user mode for tests that can't run it 2025-12-01 15:07:01 +01:00
Igor Ilic
524e3e8232 chore: Update lock files 2025-12-01 14:52:01 +01:00
Pavel Zorin
7c9a78abea CI: Smaller embedding model for Ollama test 2025-12-01 14:39:45 +01:00
Igor Ilic
859e98b494 fix: resolve issue with poetry and dev dependency 2025-12-01 13:47:16 +01:00
Boris
3cda1af29d
Merge branch 'dev' into main 2025-12-01 11:33:22 +01:00
Boris
76d054b6a5
Merge branch 'dev' into feature/cog-3156-move-codify-pipeline-out-of-main-repo 2025-12-01 11:21:34 +01:00
Igor Ilic
0bb4ece4d8 Merge branch 'main' into main-merge-vol4 2025-12-01 11:16:59 +01:00
Boris
5ce1af8cc0
Merge branch 'dev' into fix/remove-double-quotes-from-llmconfig-str-params 2025-12-01 10:09:53 +01:00
Mike Potter
73d84129de fix(api): pass run_in_background parameter to memify function
The run_in_background parameter was defined in MemifyPayloadDTO but was
never passed to the cognee_memify function call, making the parameter
effectively unused. This fix passes the parameter so users can actually
run memify operations in the background.

Signed-off-by: Mike Potter <mpotter1@gmail.com>
2025-11-28 12:40:53 -05:00
Igor Ilic
d81d63390f test: Add test for dataset database handler creation 2025-11-28 16:33:46 +01:00
Igor Ilic
a0c5867977 chore: disable backend access control 2025-11-28 14:56:33 +01:00
Igor Ilic
7e0be8f167 chore: disable backend access control for tests not supporting mode 2025-11-28 13:48:01 +01:00
Igor Ilic
7844b9a3a5 Merge branch 'multi-tenant-neo4j' of github.com:topoteretes/cognee into multi-tenant-neo4j 2025-11-28 13:12:07 +01:00
Igor Ilic
ed9b774448 chore: disable backend access control for deduplication test 2025-11-28 13:11:45 +01:00
Igor Ilic
0c825b96ff
Merge branch 'dev' into multi-tenant-neo4j 2025-11-28 12:55:48 +01:00
Rajeev Rajeshuni
57195fb5a1
Merge branch 'dev' into issue-1767 2025-11-28 17:24:55 +05:30
Vasilije
00b60aed6c
backport: Adds lance-namespace version fix to toml (fixes lancedb issue with 0.2.0 lance-namespace version) + crawler ingetration test url fix (#1842)
<!-- .github/pull_request_template.md -->

## Description
Implements a quick fix for the lance-namespace 0.0.21 to 0.2.0 release
issue with lancedb. Later this has to be revisited if they fix it on
their side, for now we fixed the lance-namespace version to the previous
one.


**If Lancedb fixes the issue on their side this can be closed**


Additionally cherry picking crawler integration test fixes from dev

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## 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.
2025-11-27 10:47:00 -08:00
Igor Ilic
45841824d0 chore: Update Cognee version 2025-11-27 19:29:44 +01:00
Igor Ilic
ddf802ff54 chore: Add migration of unique constraint for SQLite 2025-11-27 18:38:00 +01:00
Andrej Milicevic
aa8afefe8a feat: add kwargs to cognify and related tasks 2025-11-27 17:05:37 +01:00
Andrej Milicevic
c649900042 Merge branch 'dev' into feature/cog-3396-add-support-to-pass-custom-parameters-in-openai-adapter 2025-11-27 16:59:43 +01:00
Andrej Milicevic
c1857a50fa fix: remove new custom pipelien interface 2025-11-27 14:58:07 +01:00
Andrej Milicevic
f776f04ee0 feat: add registration and use of custom retrievers 2025-11-27 14:55:22 +01:00
hajdul88
0fd939ca2b updating url again 2025-11-27 13:28:48 +01:00
hajdul88
8b61e1baa2 fix: adds lance-namespace version fix to toml + fixes lancedb max version 2025-11-27 12:33:04 +01:00
Igor Ilic
1ff6a72fc7 refactor: set default value to empty dictionary 2025-11-26 16:45:18 +01:00
hajdul88
508165e883
feature: Introduces wide subgraph search in graph completion and improves QA speed (#1736)
<!-- .github/pull_request_template.md -->

This PR introduces wide vector and graph structure filtering
capabilities. With these changes, the graph completion retriever and all
retrievers that inherit from it will now filter relevant vector elements
and subgraphs based on the query. This improvement significantly
increases search speed for large graphs while maintaining—and in some
cases slightly improving—accuracy.

Changes in This PR:

-Introduced new wide_search_top_k parameter: Controls the initial search
space size

-Added graph adapter level filtering method: Enables relevant subgraph
filtering while maintaining backward compatibility. For community or
custom graph adapters that don't implement this method, the system
gracefully falls back to the original search behavior.

-Updated modal dashboard and evaluation framework: Fixed compatibility
issues.
Added comprehensive unit tests: Introduced unit tests for
brute_force_triplet_search (previously untested) and expanded the
CogneeGraph test suite.

Integration tests: Existing integration tests verify end-to-end search
functionality (no changes required).

Acceptance Criteria and Testing

To verify the new search behavior, run search queries with different
wide_search_top_k parameters while logging is enabled:
None: Triggers a full graph search (default behavior)
1: Projects a minimal subgraph (demonstrates maximum filtering)
Custom values: Test intermediate levels of filtering

Internal Testing and results:
Performance and accuracy benchmarks are available upon request. The
implementation demonstrates measurable improvements in query latency for
large graphs without sacrificing result quality.

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Code refactoring
- [x] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
None

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [x] **I have tested my changes thoroughly before submitting this PR**
- [x] **This PR contains minimal changes necessary to address the
issue/feature**
- [x] My code follows the project's coding standards and style
guidelines
- [x] I have added tests that prove my fix is effective or that my
feature works
- [x] I have added necessary documentation (if applicable)
- [x] All new and existing tests pass
- [x] I have searched existing PRs to ensure this change hasn't been
submitted already
- [x] I have linked any relevant issues in the description
- [x] My commits have clear and descriptive messages

## 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.

---------

Co-authored-by: Pavel Zorin <pazonec@yandex.ru>
2025-11-26 15:18:53 +01:00
Andrej Milicevic
700362a233 fix: fix model names and test names 2025-11-26 13:35:56 +01:00
chinu0609
12ce80005c fix: generalized queries 2025-11-26 17:32:50 +05:30
Boris Arzentar
ca271c5dbb
fix: lint error 2025-11-26 12:43:57 +01:00