43 Commits

Author SHA1 Message Date
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
0b94e0e603
Bulk embed (#403)
* add batch embeddings

* bulk edge and node embeddings

* update embeddings during add_episode

* Update graphiti_core/embedder/client.py

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

* mypy

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-26 22:09:12 -04:00
Preston Rasmussen
432d2295c6
Revert episodes (#387)
* episode search fixes and optimizations

* remove extra return string

* Update graphiti_core/utils/maintenance/graph_data_operations.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-04-22 12:03:09 -04:00
Preston Rasmussen
c36652eb75
remove redundant endpoint (#383) 2025-04-21 10:52:10 -04:00
Preston Rasmussen
009467650f
Node episodes list (#381)
* added episode list virtual field

* in progress tests

* add tests

* update search return type

* linter

* copyright notice

* mark integration tests
2025-04-20 23:20:19 -04:00
Preston Rasmussen
bad33f698e
make node record loading more robust (#363)
don't throw an error if certain pieces of the dict don't exist
2025-04-16 10:32:03 -04:00
Preston Rasmussen
c19f9d09d3
add get_by_entity_node_uuid (#357)
* add get_by_entity_node_uuid

* Update graphiti_core/nodes.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-04-15 12:37:23 -04:00
Preston Rasmussen
6c0def79d8
Use UUID as cursor (#335)
* update pagination

* update pagination

* Update graphiti_core/edges.py

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

* uuid_cursor

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-04-08 17:59:40 -04:00
Pavlo Paliychuk
65b5eeae88
Refactor ORDER BY clauses in edges and nodes to use created_at instead of uuid for better chronological sorting (#322)
* Refactor ORDER BY clauses in edges and nodes to use created_at instead of uuid for better chronological sorting

* Update ORDER BY clauses in edges and nodes to include uuid for improved sorting consistency
2025-04-08 14:48:36 -04:00
Preston Rasmussen
e83bcbb435
swap type_description to docstring (#287)
* swap type_description to docstring

* remove unused imports

* bump version

* removed unused imports
2025-03-05 15:27:03 -05:00
Preston Rasmussen
f73867e0fa
Entity classification updates (#285)
* updates

* tested

* remove unused imports

* llm outputs will be dicts rather than pydantic models

* removed unused imports
2025-03-05 12:08:11 -05:00
Preston Rasmussen
db0df06975
remove core properties from attribute list (#277) 2025-02-25 15:55:06 -05:00
Preston Rasmussen
29a071b2b8
Custom ontology (#262)
* ontology

* extract and save node labels

* extract entity type properties

* neo4j upgrade needed

* add entity types

* update typing

* update types

* updates

* Update graphiti_core/utils/maintenance/node_operations.py

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

* fix warning

* mypy updates

* update properties

* mypy ignore

* mypy types

* bump version

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
2025-02-13 12:17:52 -05:00
Preston Rasmussen
a99aad59de
Remove Episode by uuid (#261)
* add remove_episode

* delete episodes

* update

* bump version
2025-02-05 15:17:08 -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
Preston Rasmussen
8858be8cef
default to no pagination (#232)
* default to no pagination

* remove unused imports
2024-12-06 12:46:50 -05:00
Preston Rasmussen
0fbe5c0704
Pagination for get by group_id (#218)
* add pagination to subgraphs

* update pagination

* update LiteralString import

* cleanup

* cleanup

* update embedding dims
2024-12-02 11:17:37 -05:00
Preston Rasmussen
397291de4b
add delete nodes by group_id (#217)
* add delete nodes by group_id

* remove unused imports

* bump version
2024-11-18 13:55: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
63a1b11142
update new names with input_data (#204) 2024-10-29 11:03:31 -04: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
7c15b729a9
fix duplicate search results bug (#190)
* fix bugs

* format

* syntax
2024-10-14 21:54:33 -04:00
Preston Rasmussen
6c3b32e620
make broader use of debug logs (#187) 2024-10-11 16:38:56 -04:00
Preston Rasmussen
c8ff5be8ce
Msc benchmark update (#173)
* eval update

* I sped it up

* make format

* search updates

* updates

* cleanup

* make format

* remove unused imports

* poetry lock
2024-10-03 15:39:35 -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
bfd8d3bb68
Add group_id CRUD endpoints and option store content bool (#130)
* add group_ids CRUD

* option to not store content

* ellipsis
2024-09-19 16:16:40 -04:00
Preston Rasmussen
e398f95612
Mentions reranker (#124)
* documentation update

* update communities

* mentions reranker

* fix episode edge mentions

* get episode mentions

* add communities to mentions endpoint

* rebase

* defaults episodes to empty list

* update
2024-09-18 15:44:28 -04:00
Pavlo Paliychuk
529a1aaecf
fix: update UUID generation and message handling (#123)
* chore: Update uuid generation + service fixes

* chore: Version bump
2024-09-18 12:48:44 -04:00
Pavlo Paliychuk
ebb1ec2463
fix: Syntax error on node crud (#119) 2024-09-17 12:19:20 -04:00
Pavlo Paliychuk
8085b52f2a
feat: add error handling for missing nodes and edges, introduce new API endpoints, and update ZepGraphiti class (#104)
* feat: Expose crud operations to service + add graphiti errors

* fix: linter
2024-09-11 12:53:17 -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
Preston Rasmussen
42fb590606
Add group ids (#89)
* set and retrieve group ids

* update add episode with group id support

* add episode and search functional

* update bulk

* mypy updates

* remove unused imports

* update unit tests

* unit tests

* add optional uuid field

* format

* mypy

* ellipsis
2024-09-06 12:33:42 -04:00
Preston Rasmussen
a29c3557d3
fix clearing name embeddings bug (#87)
fix bug
2024-09-05 14:09:19 -04:00
Preston Rasmussen
06d8d9359f
Add Missing Node and edge CRUD (#51)
* add CRUD operations and fix search limit bugs

* format

* update tests

* å

* update tests to double limit call

* add default field

* format

* import correct field
2024-08-27 16:18:01 -04:00
Daniel Chalef
2d0705fc1b
Add get_nodes_by_query method to Graphiti class (#49)
* Add get_nodes_by_query method to Graphiti class

Add a method to the Graphiti class that wraps `get_relevant_nodes` and returns a list of nodes given a query.

* Add `get_nodes_by_query` method to the `Graphiti` class in `graphiti_core/graphiti.py`.
* Import `generate_embedding` from `graphiti_core/llm_client/utils.py`.
* Use `generate_embedding` to generate an embedding for the query.
* Call `get_relevant_nodes` with the generated embedding and return the relevant nodes.

Add an embedding function to `llm_client/utils.py`.

* Add `generate_embedding` function to `graphiti_core/llm_client/utils.py`.
* Accept an embedder and model_id as parameters.
* Generate an embedding for the given text and return it.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getzep/graphiti?shareId=XXXX-XXXX-XXXX-XXXX).

* address comments left by @danielchalef on #49 (Add get_nodes_by_query method to Graphiti class);

* fix ellipsis name in cla config

* feat: Add get_nodes_by_query method to Graphiti class

* chore: Cleanup unused files, add hybrid node search, add tests

---------

Co-authored-by: ellipsis-dev[bot] <65095814+ellipsis-dev[bot]@users.noreply.github.com>
Co-authored-by: paulpaliychuk <pavlo.paliychuk.ca@gmail.com>
2024-08-26 20:00:28 -07:00
Daniel Chalef
a6d63f0c0d
Add text episode type (#46)
Add a new `text` episode type and update the `extract_nodes` function to handle it.

* **EpisodeType Enum:**
  - Add `text` to the `EpisodeType` enum in `graphiti_core/nodes.py`.
  - Update the `from_str` method to handle the `text` episode type.

* **extract_nodes Function:**
  - Update the `extract_nodes` function in `graphiti_core/utils/maintenance/node_operations.py` to handle the `text` episode type.
  - Use the `message` type prompt for both `message` and `text` episodes.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/getzep/graphiti?shareId=XXXX-XXXX-XXXX-XXXX).
2024-08-26 15:51:13 -07:00
Pavlo Paliychuk
6e8c964aef
chore: Add comments to graphiti methods (#40)
* chore: Add comments to graphiti methods

* chore: Update int test name + add header to test files

* chore: Add comments to episode type
2024-08-26 13:11:50 -04:00
Pavlo Paliychuk
0ed7739bc0
Controlled example (#37)
* chore: Add romeo runner

* fix: Linter

* dedupe fixes

* wip

* wip dump

* allbirds

* chore: Update romeo parser

* chore: Anthropic model fix

* allbirds runner

* format

* wip

* mypy updates

* update

* remove r

* update tests

* format

* wip

* wip

* wip

* chore: Strategically update the message

* chore: Add romeo runner

* fix: Linter

* wip

* wip dump

* chore: Update romeo parser

* chore: Anthropic model fix

* wip

* allbirds

* allbirds runner

* format

* wip

* wip

* mypy updates

* update

* remove r

* update tests

* format

* wip

* chore: Strategically update the message

* rebase and fix import issues

* Update package imports for graphiti_core in examples and utils

* nits

* chore: Update OpenAI GPT-4o model to gpt-4o-2024-08-06

* implement groq

* improvments & linting

* cleanup and nits

* Refactor package imports for graphiti_core in examples and utils

* Refactor package imports for graphiti_core in examples and utils

* chore: Nuke unused examples

* chore: Nuke unused examples

* chore: Only run type check on graphiti_core

* fix unit tests

* reformat

* unit test

* fix: Unit tests

* test: Add coverage for extract_date_strings_from_edge

* lint

* remove commented code

---------

Co-authored-by: prestonrasmussen <prasmuss15@gmail.com>
Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
2024-08-26 10:30:22 -04:00
Daniel Chalef
c5e52153c4
chore: Fix packaging (#38)
* feat: Update project name and description

The project name and description in the `pyproject.toml` file have been updated to reflect the changes made to the project.

* chore: Update pyproject.toml to include core package

The `pyproject.toml` file has been updated to include the `core` package in the list of packages. This change ensures that the `core` package is included when building the project.

* fix imports

* fix importats
2024-08-25 10:07:50 -07:00