graphiti-core 0.20.1__tar.gz → 0.20.2__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.20.1 → graphiti_core-0.20.2}/PKG-INFO +1 -1
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/graphiti.py +0 -2
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/models/nodes/node_db_queries.py +0 -2
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/nodes.py +1 -4
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/search/search.py +2 -7
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/search/search_config.py +0 -4
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/search/search_utils.py +56 -100
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/bulk_utils.py +0 -5
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/maintenance/graph_data_operations.py +3 -44
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/pyproject.toml +1 -1
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/signatures/version1/cla.json +8 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/uv.lock +2 -2
- graphiti_core-0.20.1/graphiti_core/migrations/neo4j_node_group_labels.py +0 -114
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.env.example +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/dependabot.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/pull_request_template.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/secret_scanning.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/ai-moderator.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/cla.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/claude-code-review.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/claude.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/codeql.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/lint.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/mcp-server-docker.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/release-graphiti-core.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/typecheck.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.github/workflows/unit_tests.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/.gitignore +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/CLAUDE.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/CODE_OF_CONDUCT.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/CONTRIBUTING.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/Dockerfile +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/LICENSE +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/Makefile +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/README.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/SECURITY.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/Zep-CLA.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/conftest.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/depot.json +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/docker-compose.test.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/docker-compose.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/ellipsis.yaml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/data/manybirds_products.json +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/ecommerce/runner.ipynb +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/ecommerce/runner.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/langgraph-agent/agent.ipynb +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/langgraph-agent/tinybirds-jess.png +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/podcast/podcast_runner.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/podcast/podcast_transcript.txt +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/podcast/transcript_parser.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/quickstart/README.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/quickstart/quickstart_falkordb.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/quickstart/quickstart_neo4j.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/quickstart/quickstart_neptune.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/quickstart/requirements.txt +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/wizard_of_oz/parser.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/wizard_of_oz/runner.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/examples/wizard_of_oz/woo.txt +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/cross_encoder/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/cross_encoder/bge_reranker_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/cross_encoder/client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/cross_encoder/gemini_reranker_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/cross_encoder/openai_reranker_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/driver/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/driver/driver.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/driver/falkordb_driver.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/driver/kuzu_driver.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/driver/neo4j_driver.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/driver/neptune_driver.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/edges.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/embedder/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/embedder/azure_openai.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/embedder/client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/embedder/gemini.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/embedder/openai.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/embedder/voyage.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/errors.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/graph_queries.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/graphiti_types.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/helpers.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/anthropic_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/azure_openai_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/config.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/errors.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/gemini_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/groq_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/openai_base_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/openai_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/openai_generic_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/llm_client/utils.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/migrations/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/models/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/models/edges/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/models/edges/edge_db_queries.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/models/nodes/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/dedupe_edges.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/dedupe_nodes.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/eval.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/extract_edge_dates.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/extract_edges.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/extract_nodes.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/invalidate_edges.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/lib.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/models.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/prompt_helpers.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/prompts/summarize_nodes.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/py.typed +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/search/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/search/search_config_recipes.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/search/search_filters.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/search/search_helpers.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/telemetry/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/telemetry/telemetry.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/datetime_utils.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/maintenance/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/maintenance/community_operations.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/maintenance/edge_operations.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/maintenance/node_operations.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/maintenance/temporal_operations.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/maintenance/utils.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/graphiti_core/utils/ontology_utils/entity_types_utils.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/images/arxiv-screenshot.png +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/images/graphiti-graph-intro.gif +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/images/graphiti-intro-slides-stock-2.gif +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/images/simple_graph.svg +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/.env.example +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/.python-version +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/Dockerfile +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/README.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/cursor_rules.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/docker-compose.yml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/graphiti_mcp_server.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/mcp_config_sse_example.json +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/mcp_config_stdio_example.json +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/pyproject.toml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/mcp_server/uv.lock +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/poetry.lock +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/py.typed +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/pytest.ini +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/.env.example +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/Makefile +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/README.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/config.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/dto/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/dto/common.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/dto/ingest.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/dto/retrieve.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/main.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/routers/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/routers/ingest.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/routers/retrieve.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/graph_service/zep_graphiti.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/pyproject.toml +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/server/uv.lock +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/cross_encoder/test_bge_reranker_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/cross_encoder/test_gemini_reranker_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/driver/__init__.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/driver/test_falkordb_driver.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/embedder/embedder_fixtures.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/embedder/test_gemini.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/embedder/test_openai.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/embedder/test_voyage.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/evals/data/longmemeval_data/README.md +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/evals/data/longmemeval_data/longmemeval_oracle.json +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/evals/eval_cli.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/evals/eval_e2e_graph_building.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/evals/pytest.ini +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/evals/utils.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/helpers_test.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/llm_client/test_anthropic_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/llm_client/test_anthropic_client_int.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/llm_client/test_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/llm_client/test_errors.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/llm_client/test_gemini_client.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/test_edge_int.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/test_entity_exclusion_int.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/test_graphiti_int.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/test_graphiti_mock.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/test_node_int.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/utils/maintenance/test_edge_operations.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/utils/maintenance/test_temporal_operations_int.py +0 -0
- {graphiti_core-0.20.1 → graphiti_core-0.20.2}/tests/utils/search/search_utils_test.py +0 -0
|
@@ -89,7 +89,6 @@ from graphiti_core.utils.maintenance.edge_operations import (
|
|
|
89
89
|
)
|
|
90
90
|
from graphiti_core.utils.maintenance.graph_data_operations import (
|
|
91
91
|
EPISODE_WINDOW_LEN,
|
|
92
|
-
build_dynamic_indexes,
|
|
93
92
|
build_indices_and_constraints,
|
|
94
93
|
retrieve_episodes,
|
|
95
94
|
)
|
|
@@ -451,7 +450,6 @@ class Graphiti:
|
|
|
451
450
|
|
|
452
451
|
validate_excluded_entity_types(excluded_entity_types, entity_types)
|
|
453
452
|
validate_group_id(group_id)
|
|
454
|
-
await build_dynamic_indexes(self.driver, group_id)
|
|
455
453
|
|
|
456
454
|
previous_episodes = (
|
|
457
455
|
await self.retrieve_episodes(
|
|
@@ -52,7 +52,6 @@ def get_episode_node_save_query(provider: GraphProvider) -> str:
|
|
|
52
52
|
case _: # Neo4j
|
|
53
53
|
return """
|
|
54
54
|
MERGE (n:Episodic {uuid: $uuid})
|
|
55
|
-
SET n:$($group_label)
|
|
56
55
|
SET n = {uuid: $uuid, name: $name, group_id: $group_id, source_description: $source_description, source: $source, content: $content,
|
|
57
56
|
entity_edges: $entity_edges, created_at: $created_at, valid_at: $valid_at}
|
|
58
57
|
RETURN n.uuid AS uuid
|
|
@@ -96,7 +95,6 @@ def get_episode_node_save_bulk_query(provider: GraphProvider) -> str:
|
|
|
96
95
|
return """
|
|
97
96
|
UNWIND $episodes AS episode
|
|
98
97
|
MERGE (n:Episodic {uuid: episode.uuid})
|
|
99
|
-
SET n:$(episode.group_label)
|
|
100
98
|
SET n = {uuid: episode.uuid, name: episode.name, group_id: episode.group_id, source_description: episode.source_description, source: episode.source, content: episode.content,
|
|
101
99
|
entity_edges: episode.entity_edges, created_at: episode.created_at, valid_at: episode.valid_at}
|
|
102
100
|
RETURN n.uuid AS uuid
|
|
@@ -299,9 +299,6 @@ class EpisodicNode(Node):
|
|
|
299
299
|
'source': self.source.value,
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
if driver.provider == GraphProvider.NEO4J:
|
|
303
|
-
episode_args['group_label'] = 'Episodic_' + self.group_id.replace('-', '')
|
|
304
|
-
|
|
305
302
|
result = await driver.execute_query(
|
|
306
303
|
get_episode_node_save_query(driver.provider), **episode_args
|
|
307
304
|
)
|
|
@@ -471,7 +468,7 @@ class EntityNode(Node):
|
|
|
471
468
|
)
|
|
472
469
|
else:
|
|
473
470
|
entity_data.update(self.attributes or {})
|
|
474
|
-
labels = ':'.join(self.labels + ['Entity'
|
|
471
|
+
labels = ':'.join(self.labels + ['Entity'])
|
|
475
472
|
|
|
476
473
|
if driver.provider == GraphProvider.NEPTUNE:
|
|
477
474
|
driver.save_to_aoss('node_name_and_summary', [entity_data]) # pyright: ignore reportAttributeAccessIssue
|
|
@@ -325,9 +325,7 @@ async def node_search(
|
|
|
325
325
|
search_tasks = []
|
|
326
326
|
if NodeSearchMethod.bm25 in config.search_methods:
|
|
327
327
|
search_tasks.append(
|
|
328
|
-
node_fulltext_search(
|
|
329
|
-
driver, query, search_filter, group_ids, 2 * limit, config.use_local_indexes
|
|
330
|
-
)
|
|
328
|
+
node_fulltext_search(driver, query, search_filter, group_ids, 2 * limit)
|
|
331
329
|
)
|
|
332
330
|
if NodeSearchMethod.cosine_similarity in config.search_methods:
|
|
333
331
|
search_tasks.append(
|
|
@@ -338,7 +336,6 @@ async def node_search(
|
|
|
338
336
|
group_ids,
|
|
339
337
|
2 * limit,
|
|
340
338
|
config.sim_min_score,
|
|
341
|
-
config.use_local_indexes,
|
|
342
339
|
)
|
|
343
340
|
)
|
|
344
341
|
if NodeSearchMethod.bfs in config.search_methods:
|
|
@@ -434,9 +431,7 @@ async def episode_search(
|
|
|
434
431
|
search_results: list[list[EpisodicNode]] = list(
|
|
435
432
|
await semaphore_gather(
|
|
436
433
|
*[
|
|
437
|
-
episode_fulltext_search(
|
|
438
|
-
driver, query, search_filter, group_ids, 2 * limit, config.use_local_indexes
|
|
439
|
-
),
|
|
434
|
+
episode_fulltext_search(driver, query, search_filter, group_ids, 2 * limit),
|
|
440
435
|
]
|
|
441
436
|
)
|
|
442
437
|
)
|
|
@@ -24,7 +24,6 @@ from graphiti_core.search.search_utils import (
|
|
|
24
24
|
DEFAULT_MIN_SCORE,
|
|
25
25
|
DEFAULT_MMR_LAMBDA,
|
|
26
26
|
MAX_SEARCH_DEPTH,
|
|
27
|
-
USE_HNSW,
|
|
28
27
|
)
|
|
29
28
|
|
|
30
29
|
DEFAULT_SEARCH_LIMIT = 10
|
|
@@ -92,7 +91,6 @@ class NodeSearchConfig(BaseModel):
|
|
|
92
91
|
sim_min_score: float = Field(default=DEFAULT_MIN_SCORE)
|
|
93
92
|
mmr_lambda: float = Field(default=DEFAULT_MMR_LAMBDA)
|
|
94
93
|
bfs_max_depth: int = Field(default=MAX_SEARCH_DEPTH)
|
|
95
|
-
use_local_indexes: bool = Field(default=USE_HNSW)
|
|
96
94
|
|
|
97
95
|
|
|
98
96
|
class EpisodeSearchConfig(BaseModel):
|
|
@@ -101,7 +99,6 @@ class EpisodeSearchConfig(BaseModel):
|
|
|
101
99
|
sim_min_score: float = Field(default=DEFAULT_MIN_SCORE)
|
|
102
100
|
mmr_lambda: float = Field(default=DEFAULT_MMR_LAMBDA)
|
|
103
101
|
bfs_max_depth: int = Field(default=MAX_SEARCH_DEPTH)
|
|
104
|
-
use_local_indexes: bool = Field(default=USE_HNSW)
|
|
105
102
|
|
|
106
103
|
|
|
107
104
|
class CommunitySearchConfig(BaseModel):
|
|
@@ -110,7 +107,6 @@ class CommunitySearchConfig(BaseModel):
|
|
|
110
107
|
sim_min_score: float = Field(default=DEFAULT_MIN_SCORE)
|
|
111
108
|
mmr_lambda: float = Field(default=DEFAULT_MMR_LAMBDA)
|
|
112
109
|
bfs_max_depth: int = Field(default=MAX_SEARCH_DEPTH)
|
|
113
|
-
use_local_indexes: bool = Field(default=USE_HNSW)
|
|
114
110
|
|
|
115
111
|
|
|
116
112
|
class SearchConfig(BaseModel):
|
|
@@ -15,7 +15,6 @@ limitations under the License.
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
import logging
|
|
18
|
-
import os
|
|
19
18
|
from collections import defaultdict
|
|
20
19
|
from time import time
|
|
21
20
|
from typing import Any
|
|
@@ -57,7 +56,6 @@ from graphiti_core.search.search_filters import (
|
|
|
57
56
|
)
|
|
58
57
|
|
|
59
58
|
logger = logging.getLogger(__name__)
|
|
60
|
-
USE_HNSW = os.getenv('USE_HNSW', '').lower() in ('true', '1', 'yes')
|
|
61
59
|
|
|
62
60
|
RELEVANT_SCHEMA_LIMIT = 10
|
|
63
61
|
DEFAULT_MIN_SCORE = 0.6
|
|
@@ -210,11 +208,11 @@ async def edge_fulltext_search(
|
|
|
210
208
|
# Match the edge ids and return the values
|
|
211
209
|
query = (
|
|
212
210
|
"""
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
211
|
+
UNWIND $ids as id
|
|
212
|
+
MATCH (n:Entity)-[e:RELATES_TO]->(m:Entity)
|
|
213
|
+
WHERE e.group_id IN $group_ids
|
|
214
|
+
AND id(e)=id
|
|
215
|
+
"""
|
|
218
216
|
+ filter_query
|
|
219
217
|
+ """
|
|
220
218
|
AND id(e)=id
|
|
@@ -320,8 +318,8 @@ async def edge_similarity_search(
|
|
|
320
318
|
if driver.provider == GraphProvider.NEPTUNE:
|
|
321
319
|
query = (
|
|
322
320
|
"""
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
MATCH (n:Entity)-[e:RELATES_TO]->(m:Entity)
|
|
322
|
+
"""
|
|
325
323
|
+ filter_query
|
|
326
324
|
+ """
|
|
327
325
|
RETURN DISTINCT id(e) as id, e.fact_embedding as embedding
|
|
@@ -540,7 +538,6 @@ async def node_fulltext_search(
|
|
|
540
538
|
search_filter: SearchFilters,
|
|
541
539
|
group_ids: list[str] | None = None,
|
|
542
540
|
limit=RELEVANT_SCHEMA_LIMIT,
|
|
543
|
-
use_local_indexes: bool = False,
|
|
544
541
|
) -> list[EntityNode]:
|
|
545
542
|
# BM25 search to get top nodes
|
|
546
543
|
fuzzy_query = fulltext_query(query, group_ids, driver)
|
|
@@ -574,11 +571,11 @@ async def node_fulltext_search(
|
|
|
574
571
|
# Match the edge ides and return the values
|
|
575
572
|
query = (
|
|
576
573
|
"""
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
574
|
+
UNWIND $ids as i
|
|
575
|
+
MATCH (n:Entity)
|
|
576
|
+
WHERE n.uuid=i.id
|
|
577
|
+
RETURN
|
|
578
|
+
"""
|
|
582
579
|
+ get_entity_node_return_query(driver.provider)
|
|
583
580
|
+ """
|
|
584
581
|
ORDER BY i.score DESC
|
|
@@ -596,14 +593,10 @@ async def node_fulltext_search(
|
|
|
596
593
|
else:
|
|
597
594
|
return []
|
|
598
595
|
else:
|
|
599
|
-
index_name = (
|
|
600
|
-
'node_name_and_summary'
|
|
601
|
-
if not use_local_indexes
|
|
602
|
-
else 'node_name_and_summary_'
|
|
603
|
-
+ (group_ids[0].replace('-', '') if group_ids is not None else '')
|
|
604
|
-
)
|
|
605
596
|
query = (
|
|
606
|
-
get_nodes_query(
|
|
597
|
+
get_nodes_query(
|
|
598
|
+
'node_name_and_summary', '$query', limit=limit, provider=driver.provider
|
|
599
|
+
)
|
|
607
600
|
+ yield_query
|
|
608
601
|
+ filter_query
|
|
609
602
|
+ """
|
|
@@ -635,7 +628,6 @@ async def node_similarity_search(
|
|
|
635
628
|
group_ids: list[str] | None = None,
|
|
636
629
|
limit=RELEVANT_SCHEMA_LIMIT,
|
|
637
630
|
min_score: float = DEFAULT_MIN_SCORE,
|
|
638
|
-
use_local_indexes: bool = False,
|
|
639
631
|
) -> list[EntityNode]:
|
|
640
632
|
filter_queries, filter_params = node_search_filter_query_constructor(
|
|
641
633
|
search_filter, driver.provider
|
|
@@ -656,8 +648,8 @@ async def node_similarity_search(
|
|
|
656
648
|
if driver.provider == GraphProvider.NEPTUNE:
|
|
657
649
|
query = (
|
|
658
650
|
"""
|
|
659
|
-
|
|
660
|
-
|
|
651
|
+
MATCH (n:Entity)
|
|
652
|
+
"""
|
|
661
653
|
+ filter_query
|
|
662
654
|
+ """
|
|
663
655
|
RETURN DISTINCT id(n) as id, n.name_embedding as embedding
|
|
@@ -686,11 +678,11 @@ async def node_similarity_search(
|
|
|
686
678
|
# Match the edge ides and return the values
|
|
687
679
|
query = (
|
|
688
680
|
"""
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
681
|
+
UNWIND $ids as i
|
|
682
|
+
MATCH (n:Entity)
|
|
683
|
+
WHERE id(n)=i.id
|
|
684
|
+
RETURN
|
|
685
|
+
"""
|
|
694
686
|
+ get_entity_node_return_query(driver.provider)
|
|
695
687
|
+ """
|
|
696
688
|
ORDER BY i.score DESC
|
|
@@ -708,40 +700,11 @@ async def node_similarity_search(
|
|
|
708
700
|
)
|
|
709
701
|
else:
|
|
710
702
|
return []
|
|
711
|
-
elif driver.provider == GraphProvider.NEO4J and use_local_indexes:
|
|
712
|
-
index_name = 'group_entity_vector_' + (
|
|
713
|
-
group_ids[0].replace('-', '') if group_ids is not None else ''
|
|
714
|
-
)
|
|
715
|
-
query = (
|
|
716
|
-
f"""
|
|
717
|
-
CALL db.index.vector.queryNodes('{index_name}', {limit}, $search_vector) YIELD node AS n, score
|
|
718
|
-
"""
|
|
719
|
-
+ filter_query
|
|
720
|
-
+ """
|
|
721
|
-
AND score > $min_score
|
|
722
|
-
RETURN
|
|
723
|
-
"""
|
|
724
|
-
+ get_entity_node_return_query(driver.provider)
|
|
725
|
-
+ """
|
|
726
|
-
ORDER BY score DESC
|
|
727
|
-
LIMIT $limit
|
|
728
|
-
"""
|
|
729
|
-
)
|
|
730
|
-
|
|
731
|
-
records, _, _ = await driver.execute_query(
|
|
732
|
-
query,
|
|
733
|
-
search_vector=search_vector,
|
|
734
|
-
limit=limit,
|
|
735
|
-
min_score=min_score,
|
|
736
|
-
routing_='r',
|
|
737
|
-
**filter_params,
|
|
738
|
-
)
|
|
739
|
-
|
|
740
703
|
else:
|
|
741
704
|
query = (
|
|
742
705
|
"""
|
|
743
|
-
|
|
744
|
-
|
|
706
|
+
MATCH (n:Entity)
|
|
707
|
+
"""
|
|
745
708
|
+ filter_query
|
|
746
709
|
+ """
|
|
747
710
|
WITH n, """
|
|
@@ -865,7 +828,6 @@ async def episode_fulltext_search(
|
|
|
865
828
|
_search_filter: SearchFilters,
|
|
866
829
|
group_ids: list[str] | None = None,
|
|
867
830
|
limit=RELEVANT_SCHEMA_LIMIT,
|
|
868
|
-
use_local_indexes: bool = False,
|
|
869
831
|
) -> list[EpisodicNode]:
|
|
870
832
|
# BM25 search to get top episodes
|
|
871
833
|
fuzzy_query = fulltext_query(query, group_ids, driver)
|
|
@@ -915,14 +877,8 @@ async def episode_fulltext_search(
|
|
|
915
877
|
else:
|
|
916
878
|
return []
|
|
917
879
|
else:
|
|
918
|
-
index_name = (
|
|
919
|
-
'episode_content'
|
|
920
|
-
if not use_local_indexes
|
|
921
|
-
else 'episode_content_'
|
|
922
|
-
+ (group_ids[0].replace('-', '') if group_ids is not None else '')
|
|
923
|
-
)
|
|
924
880
|
query = (
|
|
925
|
-
get_nodes_query(
|
|
881
|
+
get_nodes_query('episode_content', '$query', limit=limit, provider=driver.provider)
|
|
926
882
|
+ """
|
|
927
883
|
YIELD node AS episode, score
|
|
928
884
|
MATCH (e:Episodic)
|
|
@@ -1047,8 +1003,8 @@ async def community_similarity_search(
|
|
|
1047
1003
|
if driver.provider == GraphProvider.NEPTUNE:
|
|
1048
1004
|
query = (
|
|
1049
1005
|
"""
|
|
1050
|
-
|
|
1051
|
-
|
|
1006
|
+
MATCH (n:Community)
|
|
1007
|
+
"""
|
|
1052
1008
|
+ group_filter_query
|
|
1053
1009
|
+ """
|
|
1054
1010
|
RETURN DISTINCT id(n) as id, n.name_embedding as embedding
|
|
@@ -1107,8 +1063,8 @@ async def community_similarity_search(
|
|
|
1107
1063
|
|
|
1108
1064
|
query = (
|
|
1109
1065
|
"""
|
|
1110
|
-
|
|
1111
|
-
|
|
1066
|
+
MATCH (c:Community)
|
|
1067
|
+
"""
|
|
1112
1068
|
+ group_filter_query
|
|
1113
1069
|
+ """
|
|
1114
1070
|
WITH c,
|
|
@@ -1250,9 +1206,9 @@ async def get_relevant_nodes(
|
|
|
1250
1206
|
# FIXME: Kuzu currently does not support using variables such as `node.fulltext_query` as an input to FTS, which means `get_relevant_nodes()` won't work with Kuzu as the graph driver.
|
|
1251
1207
|
query = (
|
|
1252
1208
|
"""
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1209
|
+
UNWIND $nodes AS node
|
|
1210
|
+
MATCH (n:Entity {group_id: $group_id})
|
|
1211
|
+
"""
|
|
1256
1212
|
+ filter_query
|
|
1257
1213
|
+ """
|
|
1258
1214
|
WITH node, n, """
|
|
@@ -1297,9 +1253,9 @@ async def get_relevant_nodes(
|
|
|
1297
1253
|
else:
|
|
1298
1254
|
query = (
|
|
1299
1255
|
"""
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1256
|
+
UNWIND $nodes AS node
|
|
1257
|
+
MATCH (n:Entity {group_id: $group_id})
|
|
1258
|
+
"""
|
|
1303
1259
|
+ filter_query
|
|
1304
1260
|
+ """
|
|
1305
1261
|
WITH node, n, """
|
|
@@ -1388,9 +1344,9 @@ async def get_relevant_edges(
|
|
|
1388
1344
|
if driver.provider == GraphProvider.NEPTUNE:
|
|
1389
1345
|
query = (
|
|
1390
1346
|
"""
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1347
|
+
UNWIND $edges AS edge
|
|
1348
|
+
MATCH (n:Entity {uuid: edge.source_node_uuid})-[e:RELATES_TO {group_id: edge.group_id}]-(m:Entity {uuid: edge.target_node_uuid})
|
|
1349
|
+
"""
|
|
1394
1350
|
+ filter_query
|
|
1395
1351
|
+ """
|
|
1396
1352
|
WITH e, edge
|
|
@@ -1460,9 +1416,9 @@ async def get_relevant_edges(
|
|
|
1460
1416
|
|
|
1461
1417
|
query = (
|
|
1462
1418
|
"""
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1419
|
+
UNWIND $edges AS edge
|
|
1420
|
+
MATCH (n:Entity {uuid: edge.source_node_uuid})-[:RELATES_TO]-(e:RelatesToNode_ {group_id: edge.group_id})-[:RELATES_TO]-(m:Entity {uuid: edge.target_node_uuid})
|
|
1421
|
+
"""
|
|
1466
1422
|
+ filter_query
|
|
1467
1423
|
+ """
|
|
1468
1424
|
WITH e, edge, n, m, """
|
|
@@ -1498,9 +1454,9 @@ async def get_relevant_edges(
|
|
|
1498
1454
|
else:
|
|
1499
1455
|
query = (
|
|
1500
1456
|
"""
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1457
|
+
UNWIND $edges AS edge
|
|
1458
|
+
MATCH (n:Entity {uuid: edge.source_node_uuid})-[e:RELATES_TO {group_id: edge.group_id}]-(m:Entity {uuid: edge.target_node_uuid})
|
|
1459
|
+
"""
|
|
1504
1460
|
+ filter_query
|
|
1505
1461
|
+ """
|
|
1506
1462
|
WITH e, edge, """
|
|
@@ -1573,10 +1529,10 @@ async def get_edge_invalidation_candidates(
|
|
|
1573
1529
|
if driver.provider == GraphProvider.NEPTUNE:
|
|
1574
1530
|
query = (
|
|
1575
1531
|
"""
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1532
|
+
UNWIND $edges AS edge
|
|
1533
|
+
MATCH (n:Entity)-[e:RELATES_TO {group_id: edge.group_id}]->(m:Entity)
|
|
1534
|
+
WHERE n.uuid IN [edge.source_node_uuid, edge.target_node_uuid] OR m.uuid IN [edge.target_node_uuid, edge.source_node_uuid]
|
|
1535
|
+
"""
|
|
1580
1536
|
+ filter_query
|
|
1581
1537
|
+ """
|
|
1582
1538
|
WITH e, edge
|
|
@@ -1646,10 +1602,10 @@ async def get_edge_invalidation_candidates(
|
|
|
1646
1602
|
|
|
1647
1603
|
query = (
|
|
1648
1604
|
"""
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1605
|
+
UNWIND $edges AS edge
|
|
1606
|
+
MATCH (n:Entity)-[:RELATES_TO]->(e:RelatesToNode_ {group_id: edge.group_id})-[:RELATES_TO]->(m:Entity)
|
|
1607
|
+
WHERE (n.uuid IN [edge.source_node_uuid, edge.target_node_uuid] OR m.uuid IN [edge.target_node_uuid, edge.source_node_uuid])
|
|
1608
|
+
"""
|
|
1653
1609
|
+ filter_query
|
|
1654
1610
|
+ """
|
|
1655
1611
|
WITH edge, e, n, m, """
|
|
@@ -1685,10 +1641,10 @@ async def get_edge_invalidation_candidates(
|
|
|
1685
1641
|
else:
|
|
1686
1642
|
query = (
|
|
1687
1643
|
"""
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1644
|
+
UNWIND $edges AS edge
|
|
1645
|
+
MATCH (n:Entity)-[e:RELATES_TO {group_id: edge.group_id}]->(m:Entity)
|
|
1646
|
+
WHERE n.uuid IN [edge.source_node_uuid, edge.target_node_uuid] OR m.uuid IN [edge.target_node_uuid, edge.source_node_uuid]
|
|
1647
|
+
"""
|
|
1692
1648
|
+ filter_query
|
|
1693
1649
|
+ """
|
|
1694
1650
|
WITH edge, e, """
|
|
@@ -119,8 +119,6 @@ async def add_nodes_and_edges_bulk_tx(
|
|
|
119
119
|
for episode in episodes:
|
|
120
120
|
episode['source'] = str(episode['source'].value)
|
|
121
121
|
episode.pop('labels', None)
|
|
122
|
-
if driver.provider == GraphProvider.NEO4J:
|
|
123
|
-
episode['group_label'] = 'Episodic_' + episode['group_id'].replace('-', '')
|
|
124
122
|
|
|
125
123
|
nodes = []
|
|
126
124
|
|
|
@@ -143,9 +141,6 @@ async def add_nodes_and_edges_bulk_tx(
|
|
|
143
141
|
entity_data['attributes'] = json.dumps(attributes)
|
|
144
142
|
else:
|
|
145
143
|
entity_data.update(node.attributes or {})
|
|
146
|
-
entity_data['labels'] = list(
|
|
147
|
-
set(node.labels + ['Entity', 'Entity_' + node.group_id.replace('-', '')])
|
|
148
|
-
)
|
|
149
144
|
|
|
150
145
|
nodes.append(entity_data)
|
|
151
146
|
|
|
@@ -149,9 +149,9 @@ async def retrieve_episodes(
|
|
|
149
149
|
|
|
150
150
|
query: LiteralString = (
|
|
151
151
|
"""
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
152
|
+
MATCH (e:Episodic)
|
|
153
|
+
WHERE e.valid_at <= $reference_time
|
|
154
|
+
"""
|
|
155
155
|
+ query_filter
|
|
156
156
|
+ """
|
|
157
157
|
RETURN
|
|
@@ -175,44 +175,3 @@ async def retrieve_episodes(
|
|
|
175
175
|
|
|
176
176
|
episodes = [get_episodic_node_from_record(record) for record in result]
|
|
177
177
|
return list(reversed(episodes)) # Return in chronological order
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
async def build_dynamic_indexes(driver: GraphDriver, group_id: str):
|
|
181
|
-
# Make sure indices exist for this group_id in Neo4j
|
|
182
|
-
if driver.provider == GraphProvider.NEO4J:
|
|
183
|
-
await driver.execute_query(
|
|
184
|
-
"""CREATE FULLTEXT INDEX $episode_content IF NOT EXISTS
|
|
185
|
-
FOR (e:"""
|
|
186
|
-
+ 'Episodic_'
|
|
187
|
-
+ group_id.replace('-', '')
|
|
188
|
-
+ """) ON EACH [e.content, e.source, e.source_description, e.group_id]""",
|
|
189
|
-
episode_content='episode_content_' + group_id.replace('-', ''),
|
|
190
|
-
)
|
|
191
|
-
await driver.execute_query(
|
|
192
|
-
"""CREATE FULLTEXT INDEX $node_name_and_summary IF NOT EXISTS FOR (n:"""
|
|
193
|
-
+ 'Entity_'
|
|
194
|
-
+ group_id.replace('-', '')
|
|
195
|
-
+ """) ON EACH [n.name, n.summary, n.group_id]""",
|
|
196
|
-
node_name_and_summary='node_name_and_summary_' + group_id.replace('-', ''),
|
|
197
|
-
)
|
|
198
|
-
await driver.execute_query(
|
|
199
|
-
"""CREATE FULLTEXT INDEX $community_name IF NOT EXISTS
|
|
200
|
-
FOR (n:"""
|
|
201
|
-
+ 'Community_'
|
|
202
|
-
+ group_id.replace('-', '')
|
|
203
|
-
+ """) ON EACH [n.name, n.group_id]""",
|
|
204
|
-
community_name='Community_' + group_id.replace('-', ''),
|
|
205
|
-
)
|
|
206
|
-
await driver.execute_query(
|
|
207
|
-
"""CREATE VECTOR INDEX $group_entity_vector IF NOT EXISTS
|
|
208
|
-
FOR (n:"""
|
|
209
|
-
+ 'Entity_'
|
|
210
|
-
+ group_id.replace('-', '')
|
|
211
|
-
+ """)
|
|
212
|
-
ON n.embedding
|
|
213
|
-
OPTIONS { indexConfig: {
|
|
214
|
-
`vector.dimensions`: 1024,
|
|
215
|
-
`vector.similarity_function`: 'cosine'
|
|
216
|
-
}}""",
|
|
217
|
-
group_entity_vector='group_entity_vector_' + group_id.replace('-', ''),
|
|
218
|
-
)
|
|
@@ -351,6 +351,14 @@
|
|
|
351
351
|
"created_at": "2025-09-02T07:48:05Z",
|
|
352
352
|
"repoId": 840056306,
|
|
353
353
|
"pullRequestNo": 886
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
"name": "jeanlucthumm",
|
|
357
|
+
"id": 4934853,
|
|
358
|
+
"comment_id": 3255120747,
|
|
359
|
+
"created_at": "2025-09-04T18:49:57Z",
|
|
360
|
+
"repoId": 840056306,
|
|
361
|
+
"pullRequestNo": 892
|
|
354
362
|
}
|
|
355
363
|
]
|
|
356
364
|
}
|
|
@@ -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'",
|
|
@@ -783,7 +783,7 @@ wheels = [
|
|
|
783
783
|
|
|
784
784
|
[[package]]
|
|
785
785
|
name = "graphiti-core"
|
|
786
|
-
version = "0.20.
|
|
786
|
+
version = "0.20.2"
|
|
787
787
|
source = { editable = "." }
|
|
788
788
|
dependencies = [
|
|
789
789
|
{ name = "diskcache" },
|