Commit graph

2109 commits

Author SHA1 Message Date
Boris Arzentar
f1e6f3d303 Merge remote-tracking branch 'origin/dev' 2025-02-08 15:23:38 +01:00
Boris Arzentar
6930c750a7 version: v0.1.26 2025-02-08 15:23:00 +01:00
Boris Arzentar
8b70359337 Merge remote-tracking branch 'origin/dev' 2025-02-08 15:22:29 +01:00
Boris Arzentar
95ee62ad79 fix: extract index and field name from indexable data points 2025-02-08 15:21:59 +01:00
Vasilije
896d189db0
Update README.md 2025-02-08 11:04:27 +01:00
Hande
2ef10b3b4b
update readme to mention starter repo (#510)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **Documentation**
- Improved grammatical correctness and enhanced clarity in the project
documentation.
- Refined descriptions for capabilities, user instructions, and
community engagement.
- Introduced a note about a starter repository to help users get up and
running quickly.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-08 10:37:01 +01:00
Boris Arzentar
28f5422811 Merge remote-tracking branch 'origin/dev' 2025-02-08 02:02:37 +01:00
Boris Arzentar
5e350f57bd version: v0.1.25 2025-02-08 02:02:07 +01:00
Boris
f75e35c337
fix: custom model pipeline (#508)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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


- **New Features**
• Graph visualizations now allow exporting to a user-specified file path
for more flexible output management.
• The text embedding process has been enhanced with an additional
tokenizer option for improved performance.
• A new `ExtendableDataPoint` class has been introduced for future
extensions.
• New JSON files for companies and individuals have been added to
facilitate testing and data processing.

- **Improvements**
• Search functionality now uses updated identifiers for more reliable
content retrieval.
• Metadata handling has been streamlined across various classes by
removing unnecessary type specifications.
• Enhanced serialization of properties in the Neo4j adapter for improved
handling of complex structures.
• The setup process for databases has been improved with a new
asynchronous setup function.

- **Chores**
• Dependency and configuration updates improve overall stability and
performance.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-08 02:00:15 +01:00
Igor Ilic
6be6b3d222
fix: resolve key error for visualization, handle ValueError for jedi … (#509)
…and move duplicate edge information to debug log

<!-- .github/pull_request_template.md -->

## Description
Fix visualization bug 
Handle ValueError for CodeGraph
Move debug information from print to debug logs

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

- **Bug Fixes**
- Enhanced error handling across several modules to ensure smoother
operation when unexpected conditions occur.
- Updated diagnostic and logging mechanisms to provide more robust
system feedback and reduce potential disruptions.
- Improved robustness in the deletion of properties to prevent runtime
errors related to missing keys.
- Added additional exception handling for better analysis of code
entities.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-08 00:46:46 +01:00
alekszievr
2e842652be
Fix diameter and shortest path calculation in networkx adapter [COG-1201] (#507)
…nnected graph

<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- Bug Fixes
- Enhanced reliability of graph metric calculations to gracefully handle
unexpected inputs, ensuring smoother and uninterrupted graph analysis
for end-users.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-08 00:15:26 +01:00
alekszievr
460691b76a
Test: test descriptive graph metric calculation in neo4j and networkx adapters [COG-1188] (#500)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **Refactor**
- Updated the default processing flow by removing a descriptive metrics
task.
- **New Features**
- Introduced asynchronous graph management capabilities including
checks, projection, and deletion.
  - Enhanced graph metrics extraction with additional analytics.
- **Chores**
  - Improved timestamp handling using database-driven defaults.
- **Tests**
  - Added tests to verify graph metrics consistency and accuracy.
  - Integrated a new CI workflow for automated testing of graph metrics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
Co-authored-by: Boris <boris@topoteretes.com>
2025-02-07 17:27:44 +01:00
Hande
de67a44918
update architecture diagram in readme (#506)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **Documentation**
  - Updated README formatting for improved consistency.
- Adjusted image display size from 50% to 80% to enhance visual
presentation.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-07 17:17:07 +01:00
Igor Ilic
5fe7ff9883
refactor: Refactor search so graph completion is used by default (#505)
<!-- .github/pull_request_template.md -->

## Description
Refactor search so query type doesn't need to be provided to make it
simpler for new users

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

- **Refactor**
- Improved the search interface by standardizing parameter usage with
explicit keyword arguments for specifying search types, enhancing
clarity and consistency.
- **Tests**
- Updated test cases and example integrations to align with the revised
search parameters, ensuring consistent behavior and reliable validation
of search outcomes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-07 17:16:34 +01:00
alekszievr
8396fed9a1
feat: metrics in neo4j adapter [COG-1082] (#487)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **New Features**
- Enhanced graph management capabilities allow users to verify graph
existence, project complete graphs, and remove graphs, delivering more
comprehensive graph insights.
  
- **Refactor**
  - Adjusted default task behavior for streamlined performance.
- Updated timestamp handling to ensure accurate and consistent record
tracking.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
2025-02-07 15:58:43 +01:00
SJ
0c42c10f64
Comment out the postgres configuration from .env.template (#502)
<!-- .github/pull_request_template.md -->

## Description
Simplest cognee docker setup of SQLite-NetworkX-LanceDB should not
enable postgres configuration in the .env.template by default. I think
leaving postgres details commented is better than removing them
entirely. This keeps simple optionality visible for newcomers.

## 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 configuration template to remove database parameters not used
in the default setup, with clearer guidance to ensure the intended
configuration is maintained.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 21:35:40 +01:00
hajdul88
bcd326518d
feat: implements graph visualization method for cognee (#493)
<!-- .github/pull_request_template.md -->

## Description
This PR contains the improvement of the visualization endpoint

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

- **New Features**
- Launched an enhanced interactive network visualization utility that
renders dynamic, browser-based graphs. The new feature simplifies
execution by directly generating an HTML file showcasing the
visualization—complete with interactive elements and an on-screen
confirmation—providing a more intuitive and efficient experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-06 11:22:17 +01:00
Igor Ilic
d56fd8d925
chore: Change Code graph gh action to use OpenAI API (#499)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

## 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 the CI configuration for integration tests to use revised
secret values, ensuring improved alignment with current external API
credential requirements and deprecating legacy references.
- Made several secrets optional in the workflow, enhancing flexibility
during execution.
- Removed several outdated secrets from multiple workflows, streamlining
the configuration.
- Improved error handling in the code processing logic by adding
exception management for `AttributeError` and `AssertionError`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-05 22:20:07 +01:00
Boris Arzentar
6303501637 fix: use cognee from pypi in mcp server 2025-02-05 18:51:07 +01:00
Boris Arzentar
65d51d4aa7 Merge remote-tracking branch 'origin/dev' 2025-02-05 17:53:50 +01:00
Boris Arzentar
79a1b86161 version: v0.1.24 2025-02-05 17:53:27 +01:00
Igor Ilic
df163b0431
Add pydantic settings checker (#497)
<!-- .github/pull_request_template.md -->

## Description
Add test of embedding and LLM model at beginning of cognee use
Fix issue with relational database async use
Refactor handling of cache mechanism for all databases so changes in
config can be reflected in get functions

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

- **New Features**
- Introduced connection testing for language and embedding services at
startup, ensuring improved reliability during data addition.
  
- **Refactor**
- Streamlined engine initialization across multiple database systems to
enhance performance and clarity.
- Improved parameter handling and caching strategies for faster, more
consistent operations.
  - Updated record identifiers for more robust and unique data storage.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: holchan <61059652+holchan@users.noreply.github.com>
Co-authored-by: Boris <boris@topoteretes.com>
2025-02-04 23:18:27 +01:00
Hande
690d028928
fix: mcp CODE search error (#495)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **New Features**
- Enhanced search functionality now returns JSON formatted results for
code-based queries for clearer response presentation.
  
- **Refactor**
- Updated the search logic to differentiate result handling based on
query type, maintaining string output for non-code queries.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-02-04 19:32:04 +01:00
Igor Ilic
1260fc7db0
fix: Add reraising of general exception handling in cognee [COG-1062] (#490)
<!-- .github/pull_request_template.md -->

## Description
Add re-raising of errors in general exception handling 

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

- **Bug Fixes & Stability Improvements**
- Enhanced error handling throughout the system, ensuring issues during
operations like server startup, data processing, and graph management
are properly logged and reported.

- **Refactor**
- Standardized logging practices replace basic output statements,
improving traceability and providing better insights for
troubleshooting.

- **New Features**
- Updated search functionality now returns only unique results,
enhancing data consistency and the overall user experience.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: holchan <61059652+holchan@users.noreply.github.com>
Co-authored-by: Boris <boris@topoteretes.com>
2025-02-04 10:51:05 +01:00
Vasilije
4d3acc358a
fix: mcp improvements (#472)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **Dependency Update**
	- Downgraded `mcp` package version from 1.2.0 to 1.1.3
- Updated `cognee` dependency to include additional features with
`cognee[codegraph]`

- **New Features**
- Introduced a new tool, "codify", for transforming codebases into
knowledge graphs
- Enhanced the existing "search" tool to accept a new parameter for
search type

- **Improvements**
	- Streamlined search functionality with a new modular approach
- Added new asynchronous function for retrieving and formatting code
parts

- **Documentation**
- Updated import paths for `SearchType` in various modules and tests to
reflect structural changes

- **Code Cleanup**
	- Removed legacy search module and associated classes/functions
	- Refined data transfer object classes for consistency and clarity
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Boris Arzentar <borisarzentar@gmail.com>
2025-02-04 08:47:31 +01:00
alekszievr
2858a674f5
feat: Calculate graph metrics for networkx graph [COG-1082] (#484)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **New Features**
- Enabled an option to retrieve more detailed metrics, providing
comprehensive analytics for graph and descriptive data.

- **Refactor**
- Standardized the way metrics are obtained across components for
consistent behavior and improved data accuracy.
  
- **Chore**
- Made internal enhancements to support optional detailed metric
calculations, streamlining system performance and ensuring future
scalability.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
2025-02-03 18:05:53 +01:00
alekszievr
5119992fd8
feat: Add graph metrics getter in graph db interface and adapters [COG-1082] (#483)
Dummy implementation of graph metrics to demonstrate how the interface
will look like

<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

- **New Features**
- Introduced asynchronous functionality for retrieving comprehensive
graph metrics, including counts and connectivity details, across
different systems.
  
- **Refactor**
- Streamlined metrics processing and storage by shifting to direct
retrieval from the graph engine.
- Updated naming conventions for the `GraphMetrics` database table and
reorganized module imports to enhance internal consistency.
  
- **Chores**
- Removed dataset deletion functionalities while introducing the ability
to store descriptive metrics.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
2025-02-03 15:25:04 +01:00
Boris Arzentar
a01d153971 Merge remote-tracking branch 'origin/dev' 2025-02-01 15:30:01 +01:00
Boris Arzentar
44a4f8fd0d version: v0.1.23 2025-02-01 15:23:43 +01:00
hajdul88
2fd6bfa44c
feat: implement unit tests and extensive checks around the get_graph_from_model [COG-754] (#491)
<!-- .github/pull_request_template.md -->

## Description
<!-- Provide a clear description of the changes in this PR -->

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

## Release Notes

- **Tests**
  - Added comprehensive unit tests for graph model generation
- Introduced new test scenarios covering various data structures and
edge cases
  - Implemented tests for document, chunk, and entity relationships

- **Chores**
- Updated continuous deployment workflow to trigger only on `dev` branch

The release focuses on improving test coverage and refining the
deployment process.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-01-31 18:17:23 +01:00
Igor Ilic
8879f3fbbe
feat: Add gemini support [COG-1023] (#485)
<!-- .github/pull_request_template.md -->

## Description
PR to test Gemini PR from holchan

1. Add Gemini LLM and Gemini Embedding support 
2. Fix CodeGraph issue with chunks being bigger than maximum token value
3. Add Tokenizer adapters to CodeGraph

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

- **New Features**
    - Added support for the Gemini LLM provider.
    - Expanded LLM configuration options.
- Introduced a new GitHub Actions workflow for multimetric QA
evaluation.
- Added new environment variables for LLM and embedding configurations
across various workflows.

- **Bug Fixes**
    - Improved error handling in various components.
    - Updated tokenization and embedding processes.
    - Removed warning related to missing `dict` method in data items.

- **Refactor**
    - Simplified token extraction and decoding methods.
    - Updated tokenizer interfaces.
    - Removed deprecated dependencies.
    - Enhanced retry logic and error handling in embedding processes.

- **Documentation**
    - Updated configuration comments and settings.

- **Chores**
- Updated GitHub Actions workflows to accommodate new secrets and
environment variables.
    - Modified evaluation parameters.
    - Adjusted dependency management for optional libraries.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: holchan <61059652+holchan@users.noreply.github.com>
Co-authored-by: Boris <boris@topoteretes.com>
2025-01-31 18:03:23 +01:00
hajdul88
f843c256e4
feat: Use unwind for batch edge save and add unit tests for get_graph_from_model
* feat: adds some unit tests for get_graph_from_model

* feat: updates neo4j add_edges cypher and deletes shallow get_graph_from_model

* fix: fixing merge conflict false resolve

* chore: deletes old only_root unit test
2025-01-31 13:14:04 +01:00
alekszievr
a79f7133fd
Feat: add number of tokens and descriptive graph metrics to metric table [COG-1132] (#481)
* Count the number of tokens in documents

* save token count to relational db

* Add metrics to metric table

* Store list as json instead of array in relational db table

* Sum in sql instead of python

* Unify naming

* Return data_points in descriptive metric calculation task

---------

Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
2025-01-30 12:39:14 +01:00
alekszievr
edae2771a5
Count the number of tokens in documents [COG-1071] (#476)
* Count the number of tokens in documents

* save token count to relational db

---------

Co-authored-by: Igor Ilic <30923996+dexters1@users.noreply.github.com>
2025-01-29 11:29:09 +01:00
Igor Ilic
d900060e2b
Merge pull request #468 from topoteretes/COG-970-refactor-tokenizing
Cog 970 refactor tokenizing
2025-01-29 09:02:23 +01:00
Igor Ilic
860218632f refactor: add suggestions from PR
Add suggestsions made by CodeRabbit on pull request
2025-01-28 17:15:25 +01:00
Igor Ilic
a8644e0bd7 feat: Use litellm max token size as default for model, if model exists in litellm 2025-01-28 17:00:47 +01:00
Igor Ilic
710ca78d6e
Merge branch 'dev' into COG-970-refactor-tokenizing 2025-01-28 16:31:11 +01:00
alekszievr
98f0f60980
Feat: [cog-1089] Define pydantic models for descriptive graph metrics and input metrics (#466)
* feat: make tasks a configurable argument in the cognify function

* fix: add data points task

* Define pydantic models for descriptive graph metrics and input metrics

* remove to_json method

* Use just one MetricData class instead of two

---------

Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com>
2025-01-28 16:11:31 +01:00
Igor Ilic
6f8cbdbf1c
Merge branch 'dev' into COG-970-refactor-tokenizing 2025-01-28 15:44:57 +01:00
Igor Ilic
3e29c3d8f2 docs: Update notebook to work with changes to max chunk tokens 2025-01-28 15:38:38 +01:00
Igor Ilic
4e56cd64a1 refactor: Add max chunk tokens to code graph pipeline 2025-01-28 15:33:34 +01:00
Igor Ilic
dc0450d30e test: Update document tests regrading max chunk tokens 2025-01-28 15:21:43 +01:00
Igor Ilic
e0b7be7cf0 Merge branch 'COG-970-refactor-tokenizing' of github.com:topoteretes/cognee into COG-970-refactor-tokenizing 2025-01-28 14:48:40 +01:00
Igor Ilic
41544369af test: Change test_by_paragraph tests to accomodate to change 2025-01-28 14:47:17 +01:00
Vasilije
8a50da8ff5
Merge pull request #475 from topoteretes/feat/COG-1060-code-pipeline-endpoints
feat: add codegraph related API endpoints
2025-01-28 14:46:52 +01:00
Igor Ilic
b6e21eadda
Merge branch 'dev' into COG-970-refactor-tokenizing 2025-01-28 14:33:14 +01:00
Igor Ilic
3db7f85c9c feat: Add max_chunk_tokens value to chunkers
Add formula and forwarding of max_chunk_tokens value through Cognee
2025-01-28 14:32:00 +01:00
alekszievr
5e076689ad
Feat: [COG-1074] fix multimetric eval bug (#463)
* feat: make tasks a configurable argument in the cognify function

* fix: add data points task

* Ugly hack for multi-metric eval bug

* some cleanup

---------

Co-authored-by: lxobr <122801072+lxobr@users.noreply.github.com>
2025-01-28 13:05:22 +01:00
Igor Ilic
49f60971bb Merge branch 'dev' into COG-970-refactor-tokenizing 2025-01-28 10:12:55 +01:00