graphiti-core 0.18.5__tar.gz → 0.18.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of graphiti-core might be problematic. Click here for more details.
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/CONTRIBUTING.md +3 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/PKG-INFO +1 -1
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/edges.py +15 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/graphiti.py +6 -9
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/nodes.py +27 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/search/search.py +63 -41
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/search/search_filters.py +47 -8
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/pyproject.toml +1 -1
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/signatures/version1/cla.json +8 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/test_graphiti_int.py +5 -1
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/uv.lock +2 -2
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.env.example +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/dependabot.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/pull_request_template.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/secret_scanning.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/cla.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/claude-code-review.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/claude.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/codeql.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/lint.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/mcp-server-docker.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/release-graphiti-core.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/typecheck.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.github/workflows/unit_tests.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/.gitignore +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/CLAUDE.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/CODE_OF_CONDUCT.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/Dockerfile +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/LICENSE +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/Makefile +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/README.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/SECURITY.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/Zep-CLA.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/conftest.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/depot.json +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/docker-compose.test.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/docker-compose.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/ellipsis.yaml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/data/manybirds_products.json +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/ecommerce/runner.ipynb +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/ecommerce/runner.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/langgraph-agent/agent.ipynb +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/langgraph-agent/tinybirds-jess.png +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/podcast/podcast_runner.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/podcast/podcast_transcript.txt +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/podcast/transcript_parser.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/quickstart/README.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/quickstart/quickstart_falkordb.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/quickstart/quickstart_neo4j.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/quickstart/requirements.txt +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/wizard_of_oz/parser.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/wizard_of_oz/runner.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/examples/wizard_of_oz/woo.txt +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/bge_reranker_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/gemini_reranker_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/openai_reranker_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/driver/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/driver/driver.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/driver/falkordb_driver.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/driver/neo4j_driver.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/embedder/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/embedder/azure_openai.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/embedder/client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/embedder/gemini.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/embedder/openai.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/embedder/voyage.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/errors.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/graph_queries.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/graphiti_types.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/helpers.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/anthropic_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/azure_openai_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/config.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/errors.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/gemini_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/groq_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/openai_base_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/openai_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/openai_generic_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/utils.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/models/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/models/edges/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/models/edges/edge_db_queries.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/models/nodes/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/models/nodes/node_db_queries.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/dedupe_edges.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/dedupe_nodes.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/eval.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/extract_edge_dates.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/extract_edges.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/extract_nodes.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/invalidate_edges.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/lib.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/models.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/prompt_helpers.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/prompts/summarize_nodes.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/py.typed +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/search/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/search/search_config.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/search/search_config_recipes.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/search/search_helpers.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/search/search_utils.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/telemetry/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/telemetry/telemetry.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/bulk_utils.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/datetime_utils.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/community_operations.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/edge_operations.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/graph_data_operations.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/node_operations.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/temporal_operations.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/utils.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/ontology_utils/entity_types_utils.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/images/arxiv-screenshot.png +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/images/graphiti-graph-intro.gif +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/images/graphiti-intro-slides-stock-2.gif +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/images/simple_graph.svg +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/.env.example +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/.python-version +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/Dockerfile +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/README.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/cursor_rules.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/docker-compose.yml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/graphiti_mcp_server.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/mcp_config_sse_example.json +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/mcp_config_stdio_example.json +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/pyproject.toml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/mcp_server/uv.lock +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/poetry.lock +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/py.typed +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/pytest.ini +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/.env.example +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/Makefile +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/README.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/config.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/dto/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/dto/common.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/dto/ingest.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/dto/retrieve.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/main.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/routers/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/routers/ingest.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/routers/retrieve.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/graph_service/zep_graphiti.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/pyproject.toml +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/server/uv.lock +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/cross_encoder/test_bge_reranker_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/cross_encoder/test_gemini_reranker_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/driver/__init__.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/driver/test_falkordb_driver.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/embedder/embedder_fixtures.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/embedder/test_gemini.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/embedder/test_openai.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/embedder/test_voyage.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/evals/data/longmemeval_data/README.md +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/evals/data/longmemeval_data/longmemeval_oracle.json +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/evals/eval_cli.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/evals/eval_e2e_graph_building.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/evals/pytest.ini +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/evals/utils.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/helpers_test.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/llm_client/test_anthropic_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/llm_client/test_anthropic_client_int.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/llm_client/test_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/llm_client/test_errors.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/llm_client/test_gemini_client.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/test_edge_int.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/test_entity_exclusion_int.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/test_node_int.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/utils/maintenance/test_edge_operations.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/utils/maintenance/test_temporal_operations_int.py +0 -0
- {graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/utils/search/search_utils_test.py +0 -0
|
@@ -36,6 +36,9 @@ Join our [Discord server](https://discord.com/invite/W8Kw6bsgXQ) community and p
|
|
|
36
36
|
|
|
37
37
|
## What happens next?
|
|
38
38
|
|
|
39
|
+
### Notes for Large Changes
|
|
40
|
+
> Please keep the changes as concise as possible. For major architectural changes (>500 LOC), we would expect a GitHub issue (RFC) discussing the technical design and justification. Otherwise, we will tag it with rfc-required and might not go through the PR.
|
|
41
|
+
|
|
39
42
|
Once you've found an issue tagged with "good first issue" or "help wanted," or prepared an example to share, here's how to turn that into a contribution:
|
|
40
43
|
|
|
41
44
|
1. Share your approach in the issue discussion or [Discord](https://discord.com/invite/W8Kw6bsgXQ) before diving deep into code. This helps ensure your solution adheres to the architecture of Graphiti from the start and saves you from potential rework.
|
|
@@ -64,6 +64,21 @@ class Edge(BaseModel, ABC):
|
|
|
64
64
|
|
|
65
65
|
return result
|
|
66
66
|
|
|
67
|
+
@classmethod
|
|
68
|
+
async def delete_by_uuids(cls, driver: GraphDriver, uuids: list[str]):
|
|
69
|
+
result = await driver.execute_query(
|
|
70
|
+
"""
|
|
71
|
+
MATCH (n)-[e:MENTIONS|RELATES_TO|HAS_MEMBER]->(m)
|
|
72
|
+
WHERE e.uuid IN $uuids
|
|
73
|
+
DELETE e
|
|
74
|
+
""",
|
|
75
|
+
uuids=uuids,
|
|
76
|
+
)
|
|
77
|
+
|
|
78
|
+
logger.debug(f'Deleted Edges: {uuids}')
|
|
79
|
+
|
|
80
|
+
return result
|
|
81
|
+
|
|
67
82
|
def __hash__(self):
|
|
68
83
|
return hash(self.uuid)
|
|
69
84
|
|
|
@@ -28,6 +28,7 @@ from graphiti_core.driver.driver import GraphDriver
|
|
|
28
28
|
from graphiti_core.driver.neo4j_driver import Neo4jDriver
|
|
29
29
|
from graphiti_core.edges import (
|
|
30
30
|
CommunityEdge,
|
|
31
|
+
Edge,
|
|
31
32
|
EntityEdge,
|
|
32
33
|
EpisodicEdge,
|
|
33
34
|
create_entity_edge_embeddings,
|
|
@@ -46,6 +47,7 @@ from graphiti_core.nodes import (
|
|
|
46
47
|
EntityNode,
|
|
47
48
|
EpisodeType,
|
|
48
49
|
EpisodicNode,
|
|
50
|
+
Node,
|
|
49
51
|
create_entity_node_embeddings,
|
|
50
52
|
)
|
|
51
53
|
from graphiti_core.search.search import SearchConfig, search
|
|
@@ -158,7 +160,7 @@ class Graphiti:
|
|
|
158
160
|
If not set, the Graphiti default is used.
|
|
159
161
|
ensure_ascii : bool, optional
|
|
160
162
|
Whether to escape non-ASCII characters in JSON serialization for prompts. Defaults to False.
|
|
161
|
-
Set
|
|
163
|
+
Set as False to preserve non-ASCII characters (e.g., Korean, Japanese, Chinese) in their
|
|
162
164
|
original form, making them readable in LLM logs and improving model understanding.
|
|
163
165
|
|
|
164
166
|
Returns
|
|
@@ -1066,12 +1068,7 @@ class Graphiti:
|
|
|
1066
1068
|
if record['episode_count'] == 1:
|
|
1067
1069
|
nodes_to_delete.append(node)
|
|
1068
1070
|
|
|
1069
|
-
await
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
)
|
|
1073
|
-
await semaphore_gather(
|
|
1074
|
-
*[edge.delete(self.driver) for edge in edges_to_delete],
|
|
1075
|
-
max_coroutines=self.max_coroutines,
|
|
1076
|
-
)
|
|
1071
|
+
await Node.delete_by_uuids(self.driver, [node.uuid for node in nodes_to_delete])
|
|
1072
|
+
|
|
1073
|
+
await Edge.delete_by_uuids(self.driver, [edge.uuid for edge in edges_to_delete])
|
|
1077
1074
|
await episode.delete(self.driver)
|
|
@@ -142,6 +142,33 @@ class Node(BaseModel, ABC):
|
|
|
142
142
|
batch_size=batch_size,
|
|
143
143
|
)
|
|
144
144
|
|
|
145
|
+
@classmethod
|
|
146
|
+
async def delete_by_uuids(cls, driver: GraphDriver, uuids: list[str], batch_size: int = 100):
|
|
147
|
+
if driver.provider == GraphProvider.FALKORDB:
|
|
148
|
+
for label in ['Entity', 'Episodic', 'Community']:
|
|
149
|
+
await driver.execute_query(
|
|
150
|
+
f"""
|
|
151
|
+
MATCH (n:{label})
|
|
152
|
+
WHERE n.uuid IN $uuids
|
|
153
|
+
DETACH DELETE n
|
|
154
|
+
""",
|
|
155
|
+
uuids=uuids,
|
|
156
|
+
)
|
|
157
|
+
else:
|
|
158
|
+
async with driver.session() as session:
|
|
159
|
+
await session.run(
|
|
160
|
+
"""
|
|
161
|
+
MATCH (n:Entity|Episodic|Community)
|
|
162
|
+
WHERE n.uuid IN $uuids
|
|
163
|
+
CALL {
|
|
164
|
+
WITH n
|
|
165
|
+
DETACH DELETE n
|
|
166
|
+
} IN TRANSACTIONS OF $batch_size ROWS
|
|
167
|
+
""",
|
|
168
|
+
uuids=uuids,
|
|
169
|
+
batch_size=batch_size,
|
|
170
|
+
)
|
|
171
|
+
|
|
145
172
|
@classmethod
|
|
146
173
|
async def get_by_uuid(cls, driver: GraphDriver, uuid: str): ...
|
|
147
174
|
|
|
@@ -177,31 +177,42 @@ async def edge_search(
|
|
|
177
177
|
) -> tuple[list[EntityEdge], list[float]]:
|
|
178
178
|
if config is None:
|
|
179
179
|
return [], []
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
query_vector,
|
|
187
|
-
None,
|
|
188
|
-
None,
|
|
189
|
-
search_filter,
|
|
190
|
-
group_ids,
|
|
191
|
-
2 * limit,
|
|
192
|
-
config.sim_min_score,
|
|
193
|
-
),
|
|
194
|
-
edge_bfs_search(
|
|
195
|
-
driver,
|
|
196
|
-
bfs_origin_node_uuids,
|
|
197
|
-
config.bfs_max_depth,
|
|
198
|
-
search_filter,
|
|
199
|
-
group_ids,
|
|
200
|
-
2 * limit,
|
|
201
|
-
),
|
|
202
|
-
]
|
|
180
|
+
|
|
181
|
+
# Build search tasks based on configured search methods
|
|
182
|
+
search_tasks = []
|
|
183
|
+
if EdgeSearchMethod.bm25 in config.search_methods:
|
|
184
|
+
search_tasks.append(
|
|
185
|
+
edge_fulltext_search(driver, query, search_filter, group_ids, 2 * limit)
|
|
203
186
|
)
|
|
204
|
-
|
|
187
|
+
if EdgeSearchMethod.cosine_similarity in config.search_methods:
|
|
188
|
+
search_tasks.append(
|
|
189
|
+
edge_similarity_search(
|
|
190
|
+
driver,
|
|
191
|
+
query_vector,
|
|
192
|
+
None,
|
|
193
|
+
None,
|
|
194
|
+
search_filter,
|
|
195
|
+
group_ids,
|
|
196
|
+
2 * limit,
|
|
197
|
+
config.sim_min_score,
|
|
198
|
+
)
|
|
199
|
+
)
|
|
200
|
+
if EdgeSearchMethod.bfs in config.search_methods:
|
|
201
|
+
search_tasks.append(
|
|
202
|
+
edge_bfs_search(
|
|
203
|
+
driver,
|
|
204
|
+
bfs_origin_node_uuids,
|
|
205
|
+
config.bfs_max_depth,
|
|
206
|
+
search_filter,
|
|
207
|
+
group_ids,
|
|
208
|
+
2 * limit,
|
|
209
|
+
)
|
|
210
|
+
)
|
|
211
|
+
|
|
212
|
+
# Execute only the configured search methods
|
|
213
|
+
search_results: list[list[EntityEdge]] = []
|
|
214
|
+
if search_tasks:
|
|
215
|
+
search_results = list(await semaphore_gather(*search_tasks))
|
|
205
216
|
|
|
206
217
|
if EdgeSearchMethod.bfs in config.search_methods and bfs_origin_node_uuids is None:
|
|
207
218
|
source_node_uuids = [edge.source_node_uuid for result in search_results for edge in result]
|
|
@@ -289,24 +300,35 @@ async def node_search(
|
|
|
289
300
|
) -> tuple[list[EntityNode], list[float]]:
|
|
290
301
|
if config is None:
|
|
291
302
|
return [], []
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
),
|
|
299
|
-
node_bfs_search(
|
|
300
|
-
driver,
|
|
301
|
-
bfs_origin_node_uuids,
|
|
302
|
-
search_filter,
|
|
303
|
-
config.bfs_max_depth,
|
|
304
|
-
group_ids,
|
|
305
|
-
2 * limit,
|
|
306
|
-
),
|
|
307
|
-
]
|
|
303
|
+
|
|
304
|
+
# Build search tasks based on configured search methods
|
|
305
|
+
search_tasks = []
|
|
306
|
+
if NodeSearchMethod.bm25 in config.search_methods:
|
|
307
|
+
search_tasks.append(
|
|
308
|
+
node_fulltext_search(driver, query, search_filter, group_ids, 2 * limit)
|
|
308
309
|
)
|
|
309
|
-
|
|
310
|
+
if NodeSearchMethod.cosine_similarity in config.search_methods:
|
|
311
|
+
search_tasks.append(
|
|
312
|
+
node_similarity_search(
|
|
313
|
+
driver, query_vector, search_filter, group_ids, 2 * limit, config.sim_min_score
|
|
314
|
+
)
|
|
315
|
+
)
|
|
316
|
+
if NodeSearchMethod.bfs in config.search_methods:
|
|
317
|
+
search_tasks.append(
|
|
318
|
+
node_bfs_search(
|
|
319
|
+
driver,
|
|
320
|
+
bfs_origin_node_uuids,
|
|
321
|
+
search_filter,
|
|
322
|
+
config.bfs_max_depth,
|
|
323
|
+
group_ids,
|
|
324
|
+
2 * limit,
|
|
325
|
+
)
|
|
326
|
+
)
|
|
327
|
+
|
|
328
|
+
# Execute only the configured search methods
|
|
329
|
+
search_results: list[list[EntityNode]] = []
|
|
330
|
+
if search_tasks:
|
|
331
|
+
search_results = list(await semaphore_gather(*search_tasks))
|
|
310
332
|
|
|
311
333
|
if NodeSearchMethod.bfs in config.search_methods and bfs_origin_node_uuids is None:
|
|
312
334
|
origin_node_uuids = [node.uuid for result in search_results for node in result]
|
|
@@ -28,6 +28,8 @@ class ComparisonOperator(Enum):
|
|
|
28
28
|
less_than = '<'
|
|
29
29
|
greater_than_equal = '>='
|
|
30
30
|
less_than_equal = '<='
|
|
31
|
+
is_null = 'IS NULL'
|
|
32
|
+
is_not_null = 'IS NOT NULL'
|
|
31
33
|
|
|
32
34
|
|
|
33
35
|
class DateFilter(BaseModel):
|
|
@@ -64,6 +66,19 @@ def node_search_filter_query_constructor(
|
|
|
64
66
|
return filter_query, filter_params
|
|
65
67
|
|
|
66
68
|
|
|
69
|
+
def date_filter_query_constructor(
|
|
70
|
+
value_name: str, param_name: str, operator: ComparisonOperator
|
|
71
|
+
) -> str:
|
|
72
|
+
query = '(' + value_name + ' '
|
|
73
|
+
|
|
74
|
+
if operator == ComparisonOperator.is_null or operator == ComparisonOperator.is_not_null:
|
|
75
|
+
query += operator.value + ')'
|
|
76
|
+
else:
|
|
77
|
+
query += operator.value + ' ' + param_name + ')'
|
|
78
|
+
|
|
79
|
+
return query
|
|
80
|
+
|
|
81
|
+
|
|
67
82
|
def edge_search_filter_query_constructor(
|
|
68
83
|
filters: SearchFilters,
|
|
69
84
|
) -> tuple[str, dict[str, Any]]:
|
|
@@ -85,10 +100,16 @@ def edge_search_filter_query_constructor(
|
|
|
85
100
|
valid_at_filter = '\nAND ('
|
|
86
101
|
for i, or_list in enumerate(filters.valid_at):
|
|
87
102
|
for j, date_filter in enumerate(or_list):
|
|
88
|
-
|
|
103
|
+
if date_filter.comparison_operator not in [
|
|
104
|
+
ComparisonOperator.is_null,
|
|
105
|
+
ComparisonOperator.is_not_null,
|
|
106
|
+
]:
|
|
107
|
+
filter_params['valid_at_' + str(j)] = date_filter.date
|
|
89
108
|
|
|
90
109
|
and_filters = [
|
|
91
|
-
|
|
110
|
+
date_filter_query_constructor(
|
|
111
|
+
'e.valid_at', f'$valid_at_{j}', date_filter.comparison_operator
|
|
112
|
+
)
|
|
92
113
|
for j, date_filter in enumerate(or_list)
|
|
93
114
|
]
|
|
94
115
|
and_filter_query = ''
|
|
@@ -110,10 +131,16 @@ def edge_search_filter_query_constructor(
|
|
|
110
131
|
invalid_at_filter = ' AND ('
|
|
111
132
|
for i, or_list in enumerate(filters.invalid_at):
|
|
112
133
|
for j, date_filter in enumerate(or_list):
|
|
113
|
-
|
|
134
|
+
if date_filter.comparison_operator not in [
|
|
135
|
+
ComparisonOperator.is_null,
|
|
136
|
+
ComparisonOperator.is_not_null,
|
|
137
|
+
]:
|
|
138
|
+
filter_params['invalid_at_' + str(j)] = date_filter.date
|
|
114
139
|
|
|
115
140
|
and_filters = [
|
|
116
|
-
|
|
141
|
+
date_filter_query_constructor(
|
|
142
|
+
'e.invalid_at', f'$invalid_at_{j}', date_filter.comparison_operator
|
|
143
|
+
)
|
|
117
144
|
for j, date_filter in enumerate(or_list)
|
|
118
145
|
]
|
|
119
146
|
and_filter_query = ''
|
|
@@ -135,10 +162,16 @@ def edge_search_filter_query_constructor(
|
|
|
135
162
|
created_at_filter = ' AND ('
|
|
136
163
|
for i, or_list in enumerate(filters.created_at):
|
|
137
164
|
for j, date_filter in enumerate(or_list):
|
|
138
|
-
|
|
165
|
+
if date_filter.comparison_operator not in [
|
|
166
|
+
ComparisonOperator.is_null,
|
|
167
|
+
ComparisonOperator.is_not_null,
|
|
168
|
+
]:
|
|
169
|
+
filter_params['created_at_' + str(j)] = date_filter.date
|
|
139
170
|
|
|
140
171
|
and_filters = [
|
|
141
|
-
|
|
172
|
+
date_filter_query_constructor(
|
|
173
|
+
'e.created_at', f'$created_at_{j}', date_filter.comparison_operator
|
|
174
|
+
)
|
|
142
175
|
for j, date_filter in enumerate(or_list)
|
|
143
176
|
]
|
|
144
177
|
and_filter_query = ''
|
|
@@ -160,10 +193,16 @@ def edge_search_filter_query_constructor(
|
|
|
160
193
|
expired_at_filter = ' AND ('
|
|
161
194
|
for i, or_list in enumerate(filters.expired_at):
|
|
162
195
|
for j, date_filter in enumerate(or_list):
|
|
163
|
-
|
|
196
|
+
if date_filter.comparison_operator not in [
|
|
197
|
+
ComparisonOperator.is_null,
|
|
198
|
+
ComparisonOperator.is_not_null,
|
|
199
|
+
]:
|
|
200
|
+
filter_params['expired_at_' + str(j)] = date_filter.date
|
|
164
201
|
|
|
165
202
|
and_filters = [
|
|
166
|
-
|
|
203
|
+
date_filter_query_constructor(
|
|
204
|
+
'e.expired_at', f'$expired_at_{j}', date_filter.comparison_operator
|
|
205
|
+
)
|
|
167
206
|
for j, date_filter in enumerate(or_list)
|
|
168
207
|
]
|
|
169
208
|
and_filter_query = ''
|
|
@@ -303,6 +303,14 @@
|
|
|
303
303
|
"created_at": "2025-08-08T07:52:27Z",
|
|
304
304
|
"repoId": 840056306,
|
|
305
305
|
"pullRequestNo": 816
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"name": "CaroLe-prw",
|
|
309
|
+
"id": 42695882,
|
|
310
|
+
"comment_id": 3187949734,
|
|
311
|
+
"created_at": "2025-08-14T10:29:25Z",
|
|
312
|
+
"repoId": 840056306,
|
|
313
|
+
"pullRequestNo": 833
|
|
306
314
|
}
|
|
307
315
|
]
|
|
308
316
|
}
|
|
@@ -65,7 +65,11 @@ async def test_graphiti_init(driver):
|
|
|
65
65
|
|
|
66
66
|
search_filter = SearchFilters(
|
|
67
67
|
node_labels=['Person', 'City'],
|
|
68
|
-
created_at=[
|
|
68
|
+
created_at=[
|
|
69
|
+
[DateFilter(date=None, comparison_operator=ComparisonOperator.is_null)],
|
|
70
|
+
[DateFilter(date=utc_now(), comparison_operator=ComparisonOperator.less_than)],
|
|
71
|
+
[DateFilter(date=None, comparison_operator=ComparisonOperator.is_not_null)],
|
|
72
|
+
],
|
|
69
73
|
)
|
|
70
74
|
|
|
71
75
|
results = await graphiti.search_(
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
version = 1
|
|
2
|
-
revision =
|
|
2
|
+
revision = 2
|
|
3
3
|
requires-python = ">=3.10, <4"
|
|
4
4
|
resolution-markers = [
|
|
5
5
|
"python_full_version >= '3.14'",
|
|
@@ -746,7 +746,7 @@ wheels = [
|
|
|
746
746
|
|
|
747
747
|
[[package]]
|
|
748
748
|
name = "graphiti-core"
|
|
749
|
-
version = "0.18.
|
|
749
|
+
version = "0.18.7"
|
|
750
750
|
source = { editable = "." }
|
|
751
751
|
dependencies = [
|
|
752
752
|
{ name = "diskcache" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/bge_reranker_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/gemini_reranker_client.py
RENAMED
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/cross_encoder/openai_reranker_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/azure_openai_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/openai_base_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/llm_client/openai_generic_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/edge_operations.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/node_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/graphiti_core/utils/maintenance/temporal_operations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/cross_encoder/test_bge_reranker_client.py
RENAMED
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/cross_encoder/test_gemini_reranker_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.5 → graphiti_core-0.18.7}/tests/utils/maintenance/test_edge_operations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|