Add NodeSummaryFilter callback parameter to extract_attributes_from_nodes and extract_attributes_from_node functions, allowing consumers to selectively skip summary regeneration for specific nodes. This enables downstream applications to implement custom logic for throttling or filtering which nodes should have summaries regenerated, reducing unnecessary LLM calls and token costs. Key changes: - Add NodeSummaryFilter type alias: Callable[[EntityNode], Awaitable[bool]] - Update extract_attributes_from_nodes with optional should_summarize_node parameter - Update extract_attributes_from_node with conditional summary generation logic - Add 5 comprehensive test cases covering callback functionality - Maintain full backwards compatibility (default None = all summaries generated) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cross_encoder | ||
| driver | ||
| embedder | ||
| evals | ||
| llm_client | ||
| utils | ||
| helpers_test.py | ||
| test_edge_int.py | ||
| test_entity_exclusion_int.py | ||
| test_graphiti_int.py | ||
| test_graphiti_mock.py | ||
| test_node_int.py | ||