graphiti-core 0.18.1__tar.gz → 0.18.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.18.1 → graphiti_core-0.18.2}/PKG-INFO +1 -1
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/graphiti.py +4 -4
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/helpers.py +1 -1
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/extract_nodes.py +41 -1
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_utils.py +3 -5
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/bulk_utils.py +4 -4
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/edge_operations.py +4 -4
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/node_operations.py +31 -34
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/ontology_utils/entity_types_utils.py +1 -1
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/pyproject.toml +1 -1
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/signatures/version1/cla.json +8 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_graphiti_int.py +2 -1
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/uv.lock +1 -1
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.env.example +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/dependabot.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/pull_request_template.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/secret_scanning.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/cla.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/claude-code-review.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/claude.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/codeql.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/lint.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/mcp-server-docker.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/release-graphiti-core.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/typecheck.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/unit_tests.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.gitignore +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/CLAUDE.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/CODE_OF_CONDUCT.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/CONTRIBUTING.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/Dockerfile +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/LICENSE +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/Makefile +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/README.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/SECURITY.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/Zep-CLA.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/conftest.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/depot.json +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/docker-compose.test.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/docker-compose.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/ellipsis.yaml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/data/manybirds_products.json +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/ecommerce/runner.ipynb +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/ecommerce/runner.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/langgraph-agent/agent.ipynb +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/langgraph-agent/tinybirds-jess.png +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/podcast/podcast_runner.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/podcast/podcast_transcript.txt +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/podcast/transcript_parser.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/README.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/quickstart_falkordb.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/quickstart_neo4j.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/requirements.txt +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/wizard_of_oz/parser.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/wizard_of_oz/runner.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/wizard_of_oz/woo.txt +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/bge_reranker_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/gemini_reranker_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/openai_reranker_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/driver.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/falkordb_driver.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/neo4j_driver.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/edges.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/azure_openai.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/gemini.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/openai.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/voyage.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/errors.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/graph_queries.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/graphiti_types.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/anthropic_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/azure_openai_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/config.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/errors.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/gemini_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/groq_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/openai_base_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/openai_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/openai_generic_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/utils.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/edges/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/edges/edge_db_queries.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/nodes/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/nodes/node_db_queries.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/nodes.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/dedupe_edges.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/dedupe_nodes.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/eval.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/extract_edge_dates.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/extract_edges.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/invalidate_edges.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/lib.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/models.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/prompt_helpers.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/summarize_nodes.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/py.typed +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_config.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_config_recipes.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_filters.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_helpers.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/telemetry/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/telemetry/telemetry.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/datetime_utils.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/community_operations.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/graph_data_operations.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/temporal_operations.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/utils.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/arxiv-screenshot.png +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/graphiti-graph-intro.gif +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/graphiti-intro-slides-stock-2.gif +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/simple_graph.svg +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/.env.example +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/.python-version +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/Dockerfile +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/README.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/cursor_rules.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/docker-compose.yml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/graphiti_mcp_server.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/mcp_config_sse_example.json +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/mcp_config_stdio_example.json +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/pyproject.toml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/uv.lock +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/poetry.lock +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/py.typed +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/pytest.ini +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/.env.example +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/Makefile +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/README.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/config.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/common.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/ingest.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/retrieve.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/main.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/routers/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/routers/ingest.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/routers/retrieve.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/zep_graphiti.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/pyproject.toml +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/uv.lock +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/cross_encoder/test_bge_reranker_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/cross_encoder/test_gemini_reranker_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/driver/__init__.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/driver/test_falkordb_driver.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/embedder_fixtures.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/test_gemini.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/test_openai.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/test_voyage.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/data/longmemeval_data/README.md +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/data/longmemeval_data/longmemeval_oracle.json +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/eval_cli.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/eval_e2e_graph_building.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/pytest.ini +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/utils.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/helpers_test.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_anthropic_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_anthropic_client_int.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_errors.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_gemini_client.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_edge_int.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_entity_exclusion_int.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_node_int.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/utils/maintenance/test_edge_operations.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/utils/maintenance/test_temporal_operations_int.py +0 -0
- {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/utils/search/search_utils_test.py +0 -0
|
@@ -359,10 +359,10 @@ class Graphiti:
|
|
|
359
359
|
group_id: str | None = None,
|
|
360
360
|
uuid: str | None = None,
|
|
361
361
|
update_communities: bool = False,
|
|
362
|
-
entity_types: dict[str, BaseModel] | None = None,
|
|
362
|
+
entity_types: dict[str, type[BaseModel]] | None = None,
|
|
363
363
|
excluded_entity_types: list[str] | None = None,
|
|
364
364
|
previous_episode_uuids: list[str] | None = None,
|
|
365
|
-
edge_types: dict[str, BaseModel] | None = None,
|
|
365
|
+
edge_types: dict[str, type[BaseModel]] | None = None,
|
|
366
366
|
edge_type_map: dict[tuple[str, str], list[str]] | None = None,
|
|
367
367
|
) -> AddEpisodeResults:
|
|
368
368
|
"""
|
|
@@ -555,9 +555,9 @@ class Graphiti:
|
|
|
555
555
|
self,
|
|
556
556
|
bulk_episodes: list[RawEpisode],
|
|
557
557
|
group_id: str | None = None,
|
|
558
|
-
entity_types: dict[str, BaseModel] | None = None,
|
|
558
|
+
entity_types: dict[str, type[BaseModel]] | None = None,
|
|
559
559
|
excluded_entity_types: list[str] | None = None,
|
|
560
|
-
edge_types: dict[str, BaseModel] | None = None,
|
|
560
|
+
edge_types: dict[str, type[BaseModel]] | None = None,
|
|
561
561
|
edge_type_map: dict[tuple[str, str], list[str]] | None = None,
|
|
562
562
|
):
|
|
563
563
|
"""
|
|
@@ -148,7 +148,7 @@ def validate_group_id(group_id: str) -> bool:
|
|
|
148
148
|
|
|
149
149
|
|
|
150
150
|
def validate_excluded_entity_types(
|
|
151
|
-
excluded_entity_types: list[str] | None, entity_types: dict[str, BaseModel] | None = None
|
|
151
|
+
excluded_entity_types: list[str] | None, entity_types: dict[str, type[BaseModel]] | None = None
|
|
152
152
|
) -> bool:
|
|
153
153
|
"""
|
|
154
154
|
Validate that excluded entity types are valid type names.
|
|
@@ -52,6 +52,13 @@ class EntityClassification(BaseModel):
|
|
|
52
52
|
)
|
|
53
53
|
|
|
54
54
|
|
|
55
|
+
class EntitySummary(BaseModel):
|
|
56
|
+
summary: str = Field(
|
|
57
|
+
...,
|
|
58
|
+
description='Summary containing the important information about the entity. Under 250 words',
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
55
62
|
class Prompt(Protocol):
|
|
56
63
|
extract_message: PromptVersion
|
|
57
64
|
extract_json: PromptVersion
|
|
@@ -59,6 +66,7 @@ class Prompt(Protocol):
|
|
|
59
66
|
reflexion: PromptVersion
|
|
60
67
|
classify_nodes: PromptVersion
|
|
61
68
|
extract_attributes: PromptVersion
|
|
69
|
+
extract_summary: PromptVersion
|
|
62
70
|
|
|
63
71
|
|
|
64
72
|
class Versions(TypedDict):
|
|
@@ -68,6 +76,7 @@ class Versions(TypedDict):
|
|
|
68
76
|
reflexion: PromptFunction
|
|
69
77
|
classify_nodes: PromptFunction
|
|
70
78
|
extract_attributes: PromptFunction
|
|
79
|
+
extract_summary: PromptFunction
|
|
71
80
|
|
|
72
81
|
|
|
73
82
|
def extract_message(context: dict[str, Any]) -> list[Message]:
|
|
@@ -259,9 +268,39 @@ def extract_attributes(context: dict[str, Any]) -> list[Message]:
|
|
|
259
268
|
Guidelines:
|
|
260
269
|
1. Do not hallucinate entity property values if they cannot be found in the current context.
|
|
261
270
|
2. Only use the provided MESSAGES and ENTITY to set attribute values.
|
|
271
|
+
|
|
272
|
+
<ENTITY>
|
|
273
|
+
{context['node']}
|
|
274
|
+
</ENTITY>
|
|
275
|
+
""",
|
|
276
|
+
),
|
|
277
|
+
]
|
|
278
|
+
|
|
279
|
+
|
|
280
|
+
def extract_summary(context: dict[str, Any]) -> list[Message]:
|
|
281
|
+
return [
|
|
282
|
+
Message(
|
|
283
|
+
role='system',
|
|
284
|
+
content='You are a helpful assistant that extracts entity summaries from the provided text.',
|
|
285
|
+
),
|
|
286
|
+
Message(
|
|
287
|
+
role='user',
|
|
288
|
+
content=f"""
|
|
289
|
+
|
|
290
|
+
<MESSAGES>
|
|
291
|
+
{json.dumps(context['previous_episodes'], indent=2)}
|
|
292
|
+
{json.dumps(context['episode_content'], indent=2)}
|
|
293
|
+
</MESSAGES>
|
|
294
|
+
|
|
295
|
+
Given the above MESSAGES and the following ENTITY, update the summary that combines relevant information about the entity
|
|
296
|
+
from the messages and relevant information from the existing summary.
|
|
297
|
+
|
|
298
|
+
Guidelines:
|
|
299
|
+
1. Do not hallucinate entity summary information if they cannot be found in the current context.
|
|
300
|
+
2. Only use the provided MESSAGES and ENTITY to set attribute values.
|
|
262
301
|
3. The summary attribute represents a summary of the ENTITY, and should be updated with new information about the Entity from the MESSAGES.
|
|
263
302
|
Summaries must be no longer than 250 words.
|
|
264
|
-
|
|
303
|
+
|
|
265
304
|
<ENTITY>
|
|
266
305
|
{context['node']}
|
|
267
306
|
</ENTITY>
|
|
@@ -275,6 +314,7 @@ versions: Versions = {
|
|
|
275
314
|
'extract_json': extract_json,
|
|
276
315
|
'extract_text': extract_text,
|
|
277
316
|
'reflexion': reflexion,
|
|
317
|
+
'extract_summary': extract_summary,
|
|
278
318
|
'classify_nodes': classify_nodes,
|
|
279
319
|
'extract_attributes': extract_attributes,
|
|
280
320
|
}
|
|
@@ -314,17 +314,15 @@ async def node_fulltext_search(
|
|
|
314
314
|
+ """
|
|
315
315
|
YIELD node AS n, score
|
|
316
316
|
WHERE n:Entity AND n.group_id IN $group_ids
|
|
317
|
-
WITH n, score
|
|
318
|
-
LIMIT $limit
|
|
319
317
|
"""
|
|
320
318
|
+ filter_query
|
|
321
319
|
+ """
|
|
320
|
+
WITH n, score
|
|
321
|
+
ORDER BY score DESC
|
|
322
|
+
LIMIT $limit
|
|
322
323
|
RETURN
|
|
323
324
|
"""
|
|
324
325
|
+ ENTITY_NODE_RETURN
|
|
325
|
-
+ """
|
|
326
|
-
ORDER BY score DESC
|
|
327
|
-
"""
|
|
328
326
|
)
|
|
329
327
|
|
|
330
328
|
records, _, _ = await driver.execute_query(
|
|
@@ -169,9 +169,9 @@ async def extract_nodes_and_edges_bulk(
|
|
|
169
169
|
clients: GraphitiClients,
|
|
170
170
|
episode_tuples: list[tuple[EpisodicNode, list[EpisodicNode]]],
|
|
171
171
|
edge_type_map: dict[tuple[str, str], list[str]],
|
|
172
|
-
entity_types: dict[str, BaseModel] | None = None,
|
|
172
|
+
entity_types: dict[str, type[BaseModel]] | None = None,
|
|
173
173
|
excluded_entity_types: list[str] | None = None,
|
|
174
|
-
edge_types: dict[str, BaseModel] | None = None,
|
|
174
|
+
edge_types: dict[str, type[BaseModel]] | None = None,
|
|
175
175
|
) -> tuple[list[list[EntityNode]], list[list[EntityEdge]]]:
|
|
176
176
|
extracted_nodes_bulk: list[list[EntityNode]] = await semaphore_gather(
|
|
177
177
|
*[
|
|
@@ -202,7 +202,7 @@ async def dedupe_nodes_bulk(
|
|
|
202
202
|
clients: GraphitiClients,
|
|
203
203
|
extracted_nodes: list[list[EntityNode]],
|
|
204
204
|
episode_tuples: list[tuple[EpisodicNode, list[EpisodicNode]]],
|
|
205
|
-
entity_types: dict[str, BaseModel] | None = None,
|
|
205
|
+
entity_types: dict[str, type[BaseModel]] | None = None,
|
|
206
206
|
) -> tuple[dict[str, list[EntityNode]], dict[str, str]]:
|
|
207
207
|
embedder = clients.embedder
|
|
208
208
|
min_score = 0.8
|
|
@@ -290,7 +290,7 @@ async def dedupe_edges_bulk(
|
|
|
290
290
|
extracted_edges: list[list[EntityEdge]],
|
|
291
291
|
episode_tuples: list[tuple[EpisodicNode, list[EpisodicNode]]],
|
|
292
292
|
_entities: list[EntityNode],
|
|
293
|
-
edge_types: dict[str, BaseModel],
|
|
293
|
+
edge_types: dict[str, type[BaseModel]],
|
|
294
294
|
_edge_type_map: dict[tuple[str, str], list[str]],
|
|
295
295
|
) -> dict[str, list[EntityEdge]]:
|
|
296
296
|
embedder = clients.embedder
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/edge_operations.py
RENAMED
|
@@ -114,7 +114,7 @@ async def extract_edges(
|
|
|
114
114
|
previous_episodes: list[EpisodicNode],
|
|
115
115
|
edge_type_map: dict[tuple[str, str], list[str]],
|
|
116
116
|
group_id: str = '',
|
|
117
|
-
edge_types: dict[str, BaseModel] | None = None,
|
|
117
|
+
edge_types: dict[str, type[BaseModel]] | None = None,
|
|
118
118
|
) -> list[EntityEdge]:
|
|
119
119
|
start = time()
|
|
120
120
|
|
|
@@ -249,7 +249,7 @@ async def resolve_extracted_edges(
|
|
|
249
249
|
extracted_edges: list[EntityEdge],
|
|
250
250
|
episode: EpisodicNode,
|
|
251
251
|
entities: list[EntityNode],
|
|
252
|
-
edge_types: dict[str, BaseModel],
|
|
252
|
+
edge_types: dict[str, type[BaseModel]],
|
|
253
253
|
edge_type_map: dict[tuple[str, str], list[str]],
|
|
254
254
|
) -> tuple[list[EntityEdge], list[EntityEdge]]:
|
|
255
255
|
driver = clients.driver
|
|
@@ -272,7 +272,7 @@ async def resolve_extracted_edges(
|
|
|
272
272
|
uuid_entity_map: dict[str, EntityNode] = {entity.uuid: entity for entity in entities}
|
|
273
273
|
|
|
274
274
|
# Determine which edge types are relevant for each edge
|
|
275
|
-
edge_types_lst: list[dict[str, BaseModel]] = []
|
|
275
|
+
edge_types_lst: list[dict[str, type[BaseModel]]] = []
|
|
276
276
|
for extracted_edge in extracted_edges:
|
|
277
277
|
source_node = uuid_entity_map.get(extracted_edge.source_node_uuid)
|
|
278
278
|
target_node = uuid_entity_map.get(extracted_edge.target_node_uuid)
|
|
@@ -381,7 +381,7 @@ async def resolve_extracted_edge(
|
|
|
381
381
|
related_edges: list[EntityEdge],
|
|
382
382
|
existing_edges: list[EntityEdge],
|
|
383
383
|
episode: EpisodicNode,
|
|
384
|
-
edge_types: dict[str, BaseModel] | None = None,
|
|
384
|
+
edge_types: dict[str, type[BaseModel]] | None = None,
|
|
385
385
|
) -> tuple[EntityEdge, list[EntityEdge], list[EntityEdge]]:
|
|
386
386
|
if len(related_edges) == 0 and len(existing_edges) == 0:
|
|
387
387
|
return extracted_edge, [], []
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/node_operations.py
RENAMED
|
@@ -15,13 +15,10 @@ limitations under the License.
|
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
17
|
import logging
|
|
18
|
-
from contextlib import suppress
|
|
19
18
|
from time import time
|
|
20
19
|
from typing import Any
|
|
21
|
-
from uuid import uuid4
|
|
22
20
|
|
|
23
|
-
import
|
|
24
|
-
from pydantic import BaseModel, Field
|
|
21
|
+
from pydantic import BaseModel
|
|
25
22
|
|
|
26
23
|
from graphiti_core.graphiti_types import GraphitiClients
|
|
27
24
|
from graphiti_core.helpers import MAX_REFLEXION_ITERATIONS, semaphore_gather
|
|
@@ -31,6 +28,7 @@ from graphiti_core.nodes import EntityNode, EpisodeType, EpisodicNode, create_en
|
|
|
31
28
|
from graphiti_core.prompts import prompt_library
|
|
32
29
|
from graphiti_core.prompts.dedupe_nodes import NodeDuplicate, NodeResolutions
|
|
33
30
|
from graphiti_core.prompts.extract_nodes import (
|
|
31
|
+
EntitySummary,
|
|
34
32
|
ExtractedEntities,
|
|
35
33
|
ExtractedEntity,
|
|
36
34
|
MissedEntities,
|
|
@@ -70,7 +68,7 @@ async def extract_nodes(
|
|
|
70
68
|
clients: GraphitiClients,
|
|
71
69
|
episode: EpisodicNode,
|
|
72
70
|
previous_episodes: list[EpisodicNode],
|
|
73
|
-
entity_types: dict[str, BaseModel] | None = None,
|
|
71
|
+
entity_types: dict[str, type[BaseModel]] | None = None,
|
|
74
72
|
excluded_entity_types: list[str] | None = None,
|
|
75
73
|
) -> list[EntityNode]:
|
|
76
74
|
start = time()
|
|
@@ -180,7 +178,7 @@ async def resolve_extracted_nodes(
|
|
|
180
178
|
extracted_nodes: list[EntityNode],
|
|
181
179
|
episode: EpisodicNode | None = None,
|
|
182
180
|
previous_episodes: list[EpisodicNode] | None = None,
|
|
183
|
-
entity_types: dict[str, BaseModel] | None = None,
|
|
181
|
+
entity_types: dict[str, type[BaseModel]] | None = None,
|
|
184
182
|
existing_nodes_override: list[EntityNode] | None = None,
|
|
185
183
|
) -> tuple[list[EntityNode], dict[str, str], list[tuple[EntityNode, EntityNode]]]:
|
|
186
184
|
llm_client = clients.llm_client
|
|
@@ -223,7 +221,7 @@ async def resolve_extracted_nodes(
|
|
|
223
221
|
],
|
|
224
222
|
)
|
|
225
223
|
|
|
226
|
-
entity_types_dict: dict[str, BaseModel] = entity_types if entity_types is not None else {}
|
|
224
|
+
entity_types_dict: dict[str, type[BaseModel]] = entity_types if entity_types is not None else {}
|
|
227
225
|
|
|
228
226
|
# Prepare context for LLM
|
|
229
227
|
extracted_nodes_context = [
|
|
@@ -297,7 +295,7 @@ async def extract_attributes_from_nodes(
|
|
|
297
295
|
nodes: list[EntityNode],
|
|
298
296
|
episode: EpisodicNode | None = None,
|
|
299
297
|
previous_episodes: list[EpisodicNode] | None = None,
|
|
300
|
-
entity_types: dict[str, BaseModel] | None = None,
|
|
298
|
+
entity_types: dict[str, type[BaseModel]] | None = None,
|
|
301
299
|
) -> list[EntityNode]:
|
|
302
300
|
llm_client = clients.llm_client
|
|
303
301
|
embedder = clients.embedder
|
|
@@ -326,7 +324,7 @@ async def extract_attributes_from_node(
|
|
|
326
324
|
node: EntityNode,
|
|
327
325
|
episode: EpisodicNode | None = None,
|
|
328
326
|
previous_episodes: list[EpisodicNode] | None = None,
|
|
329
|
-
entity_type: BaseModel | None = None,
|
|
327
|
+
entity_type: type[BaseModel] | None = None,
|
|
330
328
|
) -> EntityNode:
|
|
331
329
|
node_context: dict[str, Any] = {
|
|
332
330
|
'name': node.name,
|
|
@@ -335,25 +333,14 @@ async def extract_attributes_from_node(
|
|
|
335
333
|
'attributes': node.attributes,
|
|
336
334
|
}
|
|
337
335
|
|
|
338
|
-
|
|
339
|
-
'
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
)
|
|
336
|
+
attributes_context: dict[str, Any] = {
|
|
337
|
+
'node': node_context,
|
|
338
|
+
'episode_content': episode.content if episode is not None else '',
|
|
339
|
+
'previous_episodes': [ep.content for ep in previous_episodes]
|
|
340
|
+
if previous_episodes is not None
|
|
341
|
+
else [],
|
|
345
342
|
}
|
|
346
343
|
|
|
347
|
-
if entity_type is not None:
|
|
348
|
-
for field_name, field_info in entity_type.model_fields.items():
|
|
349
|
-
attributes_definitions[field_name] = (
|
|
350
|
-
field_info.annotation,
|
|
351
|
-
Field(description=field_info.description),
|
|
352
|
-
)
|
|
353
|
-
|
|
354
|
-
unique_model_name = f'EntityAttributes_{uuid4().hex}'
|
|
355
|
-
entity_attributes_model = pydantic.create_model(unique_model_name, **attributes_definitions)
|
|
356
|
-
|
|
357
344
|
summary_context: dict[str, Any] = {
|
|
358
345
|
'node': node_context,
|
|
359
346
|
'episode_content': episode.content if episode is not None else '',
|
|
@@ -362,20 +349,30 @@ async def extract_attributes_from_node(
|
|
|
362
349
|
else [],
|
|
363
350
|
}
|
|
364
351
|
|
|
365
|
-
llm_response =
|
|
366
|
-
|
|
367
|
-
|
|
352
|
+
llm_response = (
|
|
353
|
+
(
|
|
354
|
+
await llm_client.generate_response(
|
|
355
|
+
prompt_library.extract_nodes.extract_attributes(attributes_context),
|
|
356
|
+
response_model=entity_type,
|
|
357
|
+
model_size=ModelSize.small,
|
|
358
|
+
)
|
|
359
|
+
)
|
|
360
|
+
if entity_type is not None
|
|
361
|
+
else {}
|
|
362
|
+
)
|
|
363
|
+
|
|
364
|
+
summary_response = await llm_client.generate_response(
|
|
365
|
+
prompt_library.extract_nodes.extract_summary(summary_context),
|
|
366
|
+
response_model=EntitySummary,
|
|
368
367
|
model_size=ModelSize.small,
|
|
369
368
|
)
|
|
370
369
|
|
|
371
|
-
|
|
370
|
+
if entity_type is not None:
|
|
371
|
+
entity_type(**llm_response)
|
|
372
372
|
|
|
373
|
-
node.summary =
|
|
373
|
+
node.summary = summary_response.get('summary', '')
|
|
374
374
|
node_attributes = {key: value for key, value in llm_response.items()}
|
|
375
375
|
|
|
376
|
-
with suppress(KeyError):
|
|
377
|
-
del node_attributes['summary']
|
|
378
|
-
|
|
379
376
|
node.attributes.update(node_attributes)
|
|
380
377
|
|
|
381
378
|
return node
|
|
@@ -255,6 +255,14 @@
|
|
|
255
255
|
"created_at": "2025-07-29T20:00:27Z",
|
|
256
256
|
"repoId": 840056306,
|
|
257
257
|
"pullRequestNo": 782
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
"name": "bechbd",
|
|
261
|
+
"id": 6898505,
|
|
262
|
+
"comment_id": 3140501814,
|
|
263
|
+
"created_at": "2025-07-31T15:58:08Z",
|
|
264
|
+
"repoId": 840056306,
|
|
265
|
+
"pullRequestNo": 793
|
|
258
266
|
}
|
|
259
267
|
]
|
|
260
268
|
}
|
|
@@ -64,7 +64,8 @@ async def test_graphiti_init(driver):
|
|
|
64
64
|
await graphiti.build_indices_and_constraints()
|
|
65
65
|
|
|
66
66
|
search_filter = SearchFilters(
|
|
67
|
-
|
|
67
|
+
node_labels=['Person'],
|
|
68
|
+
created_at=[[DateFilter(date=utc_now(), comparison_operator=ComparisonOperator.less_than)]],
|
|
68
69
|
)
|
|
69
70
|
|
|
70
71
|
results = await graphiti.search_(
|
|
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
|
|
File without changes
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/bge_reranker_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/gemini_reranker_client.py
RENAMED
|
File without changes
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/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.1 → graphiti_core-0.18.2}/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.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/openai_base_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/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
|
|
File without changes
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/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
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/cross_encoder/test_bge_reranker_client.py
RENAMED
|
File without changes
|
{graphiti_core-0.18.1 → graphiti_core-0.18.2}/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.1 → graphiti_core-0.18.2}/tests/utils/maintenance/test_edge_operations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|