graphiti-core 0.7.9__tar.gz → 0.8.0__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.7.9 → graphiti_core-0.8.0}/PKG-INFO +1 -1
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/edges.py +26 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/graphiti.py +2 -5
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/helpers.py +1 -1
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/pyproject.toml +1 -1
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/LICENSE +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/README.md +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/cross_encoder/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/cross_encoder/bge_reranker_client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/cross_encoder/client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/cross_encoder/openai_reranker_client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/embedder/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/embedder/client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/embedder/openai.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/embedder/voyage.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/errors.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/anthropic_client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/config.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/errors.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/groq_client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/openai_client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/openai_generic_client.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/llm_client/utils.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/models/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/models/edges/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/models/edges/edge_db_queries.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/models/nodes/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/models/nodes/node_db_queries.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/nodes.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/dedupe_edges.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/dedupe_nodes.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/eval.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/extract_edge_dates.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/extract_edges.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/extract_nodes.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/invalidate_edges.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/lib.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/models.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/prompt_helpers.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/prompts/summarize_nodes.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/py.typed +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/search/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/search/search.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/search/search_config.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/search/search_config_recipes.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/search/search_filters.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/search/search_utils.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/bulk_utils.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/datetime_utils.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/__init__.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/community_operations.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/edge_operations.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/graph_data_operations.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/node_operations.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/temporal_operations.py +0 -0
- {graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/utils.py +0 -0
|
@@ -337,6 +337,32 @@ class EntityEdge(Edge):
|
|
|
337
337
|
raise GroupsEdgesNotFoundError(group_ids)
|
|
338
338
|
return edges
|
|
339
339
|
|
|
340
|
+
@classmethod
|
|
341
|
+
async def get_by_node_uuid(cls, driver: AsyncDriver, node_uuid: str):
|
|
342
|
+
query: LiteralString = """
|
|
343
|
+
MATCH (n:Entity {uuid: $node_uuid})-[e:RELATES_TO]-(m:Entity)
|
|
344
|
+
RETURN DISTINCT
|
|
345
|
+
e.uuid AS uuid,
|
|
346
|
+
n.uuid AS source_node_uuid,
|
|
347
|
+
m.uuid AS target_node_uuid,
|
|
348
|
+
e.created_at AS created_at,
|
|
349
|
+
e.name AS name,
|
|
350
|
+
e.group_id AS group_id,
|
|
351
|
+
e.fact AS fact,
|
|
352
|
+
e.fact_embedding AS fact_embedding,
|
|
353
|
+
e.episodes AS episodes,
|
|
354
|
+
e.expired_at AS expired_at,
|
|
355
|
+
e.valid_at AS valid_at,
|
|
356
|
+
e.invalid_at AS invalid_at
|
|
357
|
+
"""
|
|
358
|
+
records, _, _ = await driver.execute_query(
|
|
359
|
+
query, node_uuid=node_uuid, database_=DEFAULT_DATABASE, routing_='r'
|
|
360
|
+
)
|
|
361
|
+
|
|
362
|
+
edges = [get_entity_edge_from_record(record) for record in records]
|
|
363
|
+
|
|
364
|
+
return edges
|
|
365
|
+
|
|
340
366
|
|
|
341
367
|
class CommunityEdge(Edge):
|
|
342
368
|
async def save(self, driver: AsyncDriver):
|
|
@@ -39,7 +39,6 @@ from graphiti_core.search.search_config_recipes import (
|
|
|
39
39
|
from graphiti_core.search.search_filters import SearchFilters
|
|
40
40
|
from graphiti_core.search.search_utils import (
|
|
41
41
|
RELEVANT_SCHEMA_LIMIT,
|
|
42
|
-
get_communities_by_nodes,
|
|
43
42
|
get_mentioned_nodes,
|
|
44
43
|
get_relevant_edges,
|
|
45
44
|
get_relevant_nodes,
|
|
@@ -708,7 +707,7 @@ class Graphiti:
|
|
|
708
707
|
bfs_origin_node_uuids,
|
|
709
708
|
)
|
|
710
709
|
|
|
711
|
-
async def
|
|
710
|
+
async def get_nodes_and_edges_by_episode(self, episode_uuids: list[str]) -> SearchResults:
|
|
712
711
|
episodes = await EpisodicNode.get_by_uuids(self.driver, episode_uuids)
|
|
713
712
|
|
|
714
713
|
edges_list = await semaphore_gather(
|
|
@@ -719,9 +718,7 @@ class Graphiti:
|
|
|
719
718
|
|
|
720
719
|
nodes = await get_mentioned_nodes(self.driver, episodes)
|
|
721
720
|
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
return SearchResults(edges=edges, nodes=nodes, communities=communities)
|
|
721
|
+
return SearchResults(edges=edges, nodes=nodes, communities=[])
|
|
725
722
|
|
|
726
723
|
async def add_triplet(self, source_node: EntityNode, edge: EntityEdge, target_node: EntityNode):
|
|
727
724
|
if source_node.name_embedding is None:
|
|
@@ -28,7 +28,7 @@ load_dotenv()
|
|
|
28
28
|
DEFAULT_DATABASE = os.getenv('DEFAULT_DATABASE', None)
|
|
29
29
|
USE_PARALLEL_RUNTIME = bool(os.getenv('USE_PARALLEL_RUNTIME', False))
|
|
30
30
|
SEMAPHORE_LIMIT = int(os.getenv('SEMAPHORE_LIMIT', 20))
|
|
31
|
-
MAX_REFLEXION_ITERATIONS = 2
|
|
31
|
+
MAX_REFLEXION_ITERATIONS = int(os.getenv('MAX_REFLEXION_ITERATIONS', 2))
|
|
32
32
|
DEFAULT_PAGE_LIMIT = 20
|
|
33
33
|
|
|
34
34
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/cross_encoder/bge_reranker_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/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
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/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
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/community_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/edge_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/graph_data_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/node_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.7.9 → graphiti_core-0.8.0}/graphiti_core/utils/maintenance/temporal_operations.py
RENAMED
|
File without changes
|
|
File without changes
|