graphiti-core 0.9.5__tar.gz → 0.9.6__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.9.5 → graphiti_core-0.9.6}/PKG-INFO +1 -1
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/search/search_config.py +1 -1
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/search/search_helpers.py +34 -18
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/pyproject.toml +1 -1
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/LICENSE +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/README.md +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/cross_encoder/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/cross_encoder/bge_reranker_client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/cross_encoder/client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/cross_encoder/openai_reranker_client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/edges.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/embedder/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/embedder/client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/embedder/gemini.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/embedder/openai.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/embedder/voyage.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/errors.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/graphiti.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/helpers.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/anthropic_client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/config.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/errors.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/gemini_client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/groq_client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/openai_client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/openai_generic_client.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/llm_client/utils.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/models/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/models/edges/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/models/edges/edge_db_queries.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/models/nodes/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/models/nodes/node_db_queries.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/nodes.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/dedupe_edges.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/dedupe_nodes.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/eval.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/extract_edge_dates.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/extract_edges.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/extract_nodes.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/invalidate_edges.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/lib.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/models.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/prompt_helpers.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/prompts/summarize_nodes.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/py.typed +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/search/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/search/search.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/search/search_config_recipes.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/search/search_filters.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/search/search_utils.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/bulk_utils.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/datetime_utils.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/__init__.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/community_operations.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/edge_operations.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/graph_data_operations.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/node_operations.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/temporal_operations.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/utils.py +0 -0
- {graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/ontology_utils/entity_types_utils.py +0 -0
|
@@ -14,6 +14,8 @@ See the License for the specific language governing permissions and
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
"""
|
|
16
16
|
|
|
17
|
+
import json
|
|
18
|
+
|
|
17
19
|
from graphiti_core.edges import EntityEdge
|
|
18
20
|
from graphiti_core.search.search_config import SearchResults
|
|
19
21
|
|
|
@@ -25,23 +27,37 @@ def format_edge_date_range(edge: EntityEdge) -> str:
|
|
|
25
27
|
|
|
26
28
|
def search_results_to_context_string(search_results: SearchResults) -> str:
|
|
27
29
|
"""Reformats a set of SearchResults into a single string to pass directly to an LLM as context"""
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
30
|
+
fact_json = [
|
|
31
|
+
{
|
|
32
|
+
'fact': edge.fact,
|
|
33
|
+
'valid_at': str(edge.valid_at),
|
|
34
|
+
'invalid_at': str(edge.invalid_at or 'Present'),
|
|
35
|
+
}
|
|
36
|
+
for edge in search_results.edges
|
|
37
|
+
]
|
|
38
|
+
entity_json = [
|
|
39
|
+
{'entity_name': node.name, 'summary': node.summary} for node in search_results.nodes
|
|
40
|
+
]
|
|
41
|
+
community_json = [
|
|
42
|
+
{'community_name': community.name, 'summary': community.summary}
|
|
43
|
+
for community in search_results.communities
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
context_string = f"""
|
|
47
|
+
FACTS and ENTITIES represent relevant context to the current conversation.
|
|
48
|
+
COMMUNITIES represent a cluster of closely related entities.
|
|
49
|
+
|
|
50
|
+
These are the most relevant facts and their valid and invalid dates. Facts are considered valid
|
|
51
|
+
between their valid_at and invalid_at dates. Facts with an invalid_at date of "Present" are considered valid.
|
|
52
|
+
<FACTS>
|
|
53
|
+
{json.dumps(fact_json, indent=12)}
|
|
54
|
+
</FACTS>
|
|
55
|
+
<ENTITIES>
|
|
56
|
+
{json.dumps(entity_json, indent=12)}
|
|
57
|
+
</ENTITIES>
|
|
58
|
+
<COMMUNITIES>
|
|
59
|
+
{json.dumps(community_json, indent=12)}
|
|
60
|
+
</COMMUNITIES>
|
|
61
|
+
"""
|
|
46
62
|
|
|
47
63
|
return context_string
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "graphiti-core"
|
|
3
3
|
description = "A temporal graph building library"
|
|
4
|
-
version = "0.9.
|
|
4
|
+
version = "0.9.6"
|
|
5
5
|
authors = [
|
|
6
6
|
{ "name" = "Paul Paliychuk", "email" = "paul@getzep.com" },
|
|
7
7
|
{ "name" = "Preston Rasmussen", "email" = "preston@getzep.com" },
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/cross_encoder/bge_reranker_client.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/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
|
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/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
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/community_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/edge_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/graph_data_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/node_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/maintenance/temporal_operations.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.9.5 → graphiti_core-0.9.6}/graphiti_core/utils/ontology_utils/entity_types_utils.py
RENAMED
|
File without changes
|