25 Commits

Author SHA1 Message Date
Daniel Chalef
aa6e38856a
[REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699)
* fix: remove global DEFAULT_DATABASE usage in favor of driver-specific
config

Fixes bugs introduced in PR #607. This removes reliance on the global
DEFAULT_DATABASE environment variable. It specifies the database within
each driver. PR #607 introduced a Neo4j compatability, as the database
names are different when attempting to support FalkorDB.

This refactor improves compatability across database types and ensures
future reliance by isolating the configuraiton to the driver level.

* fix: make falkordb support optional

This ensures that the the optional dependency and subsequent import is compliant with the graphiti-core project dependencies.

* chore: fmt code

* chore: undo changes to uv.lock

* fix: undo potentially breaking changes to drive interface

* fix: ensure a default database of "None" is provided - falling back to internal default

* chore: ensure default value exists for session and delete_all_indexes

* chore: fix typos and grammar

* chore: update package versions and dependencies in uv.lock and bulk_utils.py

* docs: update database configuration instructions for Neo4j and FalkorDB

Clarified default database names and how to override them in driver constructors. Updated testing requirements to include specific commands for running integration and unit tests.

* fix: ensure params defaults to an empty dictionary in Neo4jDriver

Updated the execute_query method to initialize params as an empty dictionary if not provided, ensuring compatibility with the database configuration.

---------

Co-authored-by: Urmzd <urmzd@dal.ca>
2025-07-10 17:25:39 -04:00
Daniel Chalef
8213d10d44
migrate to pyright (#646)
* migrate to pyright

* Refactor type checking to use Pyright, update dependencies, and clean up code.

- Replaced MyPy with Pyright in configuration files and CI workflows.
- Updated `pyproject.toml` and `uv.lock` to reflect new dependencies and versions.
- Adjusted type hints and fixed minor code issues across various modules for better compatibility with Pyright.
- Added new packages `backoff` and `posthog` to the project dependencies.

* Update CI workflows to install all extra dependencies for type checking and unit tests

* Update dependencies in uv.lock to replace MyPy with Pyright and add nodeenv package. Adjust type hinting in config.py for compatibility with Pyright.
2025-06-30 12:04:21 -07:00
Preston Rasmussen
19fde653a6
update driver (#583)
* update driver

* mypy updates

* mypy updates

* mypy updates

* Update graphiti_core/graph_queries.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

* mypy updates

* mypy

* mypy updates

* mypy updates

* mypy updates

* mypy updates

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-13 14:12:09 -04:00
Preston Rasmussen
14146dc46f
Add support for falkordb (#575)
* [wip] add support for falkordb

* updates

* fix-async

* progress

* fix-issues

* rm-date-handler

* red-code

* rm-uns-try

* fix-exm

* rm-un-lines

* fix-comments

* fix-se-utils

* fix-falkor-readme

* fix-falkor-cosine-score

* update-falkor-ver

* fix-vec-sim

* min-updates

* make format

* update graph driver abstraction

* poetry lock

* updates

* linter

* Update graphiti_core/search/search_utils.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: Dudi Zimberknopf <zimber.dudi@gmail.com>
Co-authored-by: Gal Shubeli <galshubeli93@gmail.com>
Co-authored-by: Gal Shubeli <124919062+galshubeli@users.noreply.github.com>
Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-06-13 12:06:57 -04:00
Preston Rasmussen
1f2f1eeab5
Size optimizations (#456)
* memory optimizations for vectors

* debugged

* unused import

* Update graphiti_core/edges.py

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-05-07 20:08:30 -04:00
Preston Rasmussen
f578ee2177
prompt update (#378) 2025-04-18 00:09:12 -04:00
FuJiaJie123
9ca7ff6cf9
Fix bug of label_propagation (#302)
Fix bug of issue #297
2025-04-17 15:22:24 -04:00
Daniel Chalef
0f6ac57dab
chore: update version to 0.9.3 and restructure dependencies (#338)
* Bump version from 0.9.0 to 0.9.1 in pyproject.toml and update google-genai dependency to >=0.1.0

* Bump version from 0.9.1 to 0.9.2 in pyproject.toml

* Update google-genai dependency version to >=0.8.0 in pyproject.toml

* loc file

* Update pyproject.toml to version 0.9.3, restructure dependencies, and modify author format. Remove outdated Google API key note from README.md.

* upgrade poetry and ruff
2025-04-08 20:47:38 -07:00
Daniel Chalef
9e78890f2e
Gemini support (#324)
* first cut

* Update dependencies and enhance README for optional LLM providers

- Bump aiohttp version from 3.11.14 to 3.11.16
- Update yarl version from 1.18.3 to 1.19.0
- Modify pyproject.toml to include optional extras for Anthropic, Groq, and Google Gemini
- Revise README.md to reflect new optional LLM provider installation instructions and clarify API key requirements

* Remove deprecated packages from poetry.lock and update content hash

- Removed cachetools, google-auth, google-genai, pyasn1, pyasn1-modules, rsa, and websockets from the lock file.
- Added new extras for anthropic, google-genai, and groq.
- Updated content hash to reflect changes.

* Refactor import paths for GeminiClient in README and __init__.py

- Updated import statement in README.md to reflect the new module structure for GeminiClient.
- Removed GeminiClient from the __all__ list in __init__.py as it is no longer directly imported.

* Refactor import paths for GeminiEmbedder in README and __init__.py

- Updated import statement in README.md to reflect the new module structure for GeminiEmbedder.
- Removed GeminiEmbedder and GeminiEmbedderConfig from the __all__ list in __init__.py as they are no longer directly imported.
2025-04-06 09:27:04 -07:00
Preston Rasmussen
00fe87679e
Bounded semaphore - limiting concurrency (#244)
* WIP

* add semaphore

* remove unused imports

* remove unused imports

* lower concurrency limit
2024-12-17 13:08:18 -05:00
Daniel Chalef
445dccc021
refactor: use utc_now() for consistent UTC datetime handling (#234)
* ensure utc timezones

* fix: dep cycle

---------

Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
2024-12-09 10:36:04 -08:00
Daniel Chalef
567a8ab74a
Implement OpenAI Structured Output (#225)
* implement so

* bug fixes and typing

* inject schema for non-openai clients

* correct datetime format

* remove List keyword

* Refactor node_operations.py to use updated prompt_library functions

* update example
2024-12-05 07:03:18 -08:00
Preston Rasmussen
281fe072cb
add fulltext search limit (#215)
* add fulltext search limit

* format

* update

* update

* update tests

* remove unused imports

* format

* mypy
2024-11-14 12:18:18 -05:00
Preston Rasmussen
3199e893ed
add_fact endpoint (#207)
* add_fact endpoint

* bump version

* add edge invalidation

* update
2024-11-06 09:12:21 -05:00
Preston Rasmussen
50d2308c93
Use sessions search (#197)
* use sessions for searches

* correct DB name

* fix typo
2024-10-22 10:01:56 -04:00
Preston Rasmussen
b217d1e51f
Make default DB explicit (#195)
* add default database

* update

* init tests

* update test

* bump version

* removed unused imports
2024-10-21 12:33:32 -04:00
Preston Rasmussen
6c3b32e620
make broader use of debug logs (#187) 2024-10-11 16:38:56 -04:00
Preston Rasmussen
49aeaf75f2
Add mmr reranking (#180)
* mmr start

* add mmr function

* normalize

* add mmr options to search

* update communities

* build communities

* format

* clean up normalization

* normalize in mmr

* update
2024-10-08 13:55:10 -04:00
Pavlo Paliychuk
a7148d6260
feat: Dedicated embedder interface (#159)
* feat: Add Embedder interface and implement openai embedder

* feat: Add voyage ai embedder
2024-09-27 12:47:04 -04:00
ARNO
5bd18fc7dd
feat: configurable embedding model (#156)
* feat: configurable embedding model

format

* chore: Update comment

* chore: Pass embedding model in search utils

---------

Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
2024-09-26 13:31:22 -07:00
Preston Rasmussen
794b705664
Group id fix (#152)
* node distance and group_ids fixed

* get all with no group_id passed

* push

* push

* remove comments

* mypy

* mypy ids

* please mypy

* trust

* last one
2024-09-24 15:55:30 -04:00
Preston Rasmussen
5506a01e24
In memory label propagation community detection (#136)
* WIP

* in memory graph detection

* format

* add comments

* update readme

* fixed an issue where solo nodes would throw an error when building communities
2024-09-23 11:05:44 -04:00
Daniel Chalef
5d2121e1a3
limit community building concurrency (#142) 2024-09-22 13:38:54 -07:00
Preston Rasmussen
a18b3179ee
Add community update (#121)
* documentation update

* update communities

* update runner

* make format

* mypy

* oops

* add update_communities
2024-09-18 11:37:34 -04:00
Preston Rasmussen
c0a740ff60
Community nodes (#103)
* add gds

* community work

* save progress

* community updates

* e2e communities

* troubleshooting

* updates

* communities

* remove unused import
2024-09-11 12:06:35 -04:00