graphiti-core 0.12.0rc2__py3-none-any.whl → 0.12.0rc4__py3-none-any.whl

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.

@@ -21,8 +21,6 @@ from typing import Any
21
21
  from pydantic import BaseModel, Field
22
22
  from typing_extensions import LiteralString
23
23
 
24
- from graphiti_core.helpers import lucene_sanitize
25
-
26
24
 
27
25
  class ComparisonOperator(Enum):
28
26
  equals = '='
@@ -60,7 +58,7 @@ def node_search_filter_query_constructor(
60
58
  filter_params: dict[str, Any] = {}
61
59
 
62
60
  if filters.node_labels is not None:
63
- node_labels = '|'.join(list(map(lucene_sanitize, filters.node_labels)))
61
+ node_labels = '|'.join(filters.node_labels)
64
62
  node_label_filter = ' AND n:' + node_labels
65
63
  filter_query += node_label_filter
66
64
 
@@ -80,7 +78,7 @@ def edge_search_filter_query_constructor(
80
78
  filter_params['edge_types'] = edge_types
81
79
 
82
80
  if filters.node_labels is not None:
83
- node_labels = '|'.join(list(map(lucene_sanitize, filters.node_labels)))
81
+ node_labels = '|'.join(filters.node_labels)
84
82
  node_label_filter = '\nAND n:' + node_labels + ' AND m:' + node_labels
85
83
  filter_query += node_label_filter
86
84
 
@@ -97,12 +95,12 @@ def edge_search_filter_query_constructor(
97
95
  and_filter_query = ''
98
96
  for j, and_filter in enumerate(and_filters):
99
97
  and_filter_query += and_filter
100
- if j != len(and_filter_query) - 1:
98
+ if j != len(and_filters) - 1:
101
99
  and_filter_query += ' AND '
102
100
 
103
101
  valid_at_filter += and_filter_query
104
102
 
105
- if i == len(or_list) - 1:
103
+ if i == len(filters.valid_at) - 1:
106
104
  valid_at_filter += ')'
107
105
  else:
108
106
  valid_at_filter += ' OR '
@@ -122,12 +120,12 @@ def edge_search_filter_query_constructor(
122
120
  and_filter_query = ''
123
121
  for j, and_filter in enumerate(and_filters):
124
122
  and_filter_query += and_filter
125
- if j != len(and_filter_query) - 1:
123
+ if j != len(and_filters) - 1:
126
124
  and_filter_query += ' AND '
127
125
 
128
126
  invalid_at_filter += and_filter_query
129
127
 
130
- if i == len(or_list) - 1:
128
+ if i == len(filters.invalid_at) - 1:
131
129
  invalid_at_filter += ')'
132
130
  else:
133
131
  invalid_at_filter += ' OR '
@@ -147,12 +145,12 @@ def edge_search_filter_query_constructor(
147
145
  and_filter_query = ''
148
146
  for j, and_filter in enumerate(and_filters):
149
147
  and_filter_query += and_filter
150
- if j != len(and_filter_query) - 1:
148
+ if j != len(and_filters) - 1:
151
149
  and_filter_query += ' AND '
152
150
 
153
151
  created_at_filter += and_filter_query
154
152
 
155
- if i == len(or_list) - 1:
153
+ if i == len(filters.created_at) - 1:
156
154
  created_at_filter += ')'
157
155
  else:
158
156
  created_at_filter += ' OR '
@@ -172,12 +170,12 @@ def edge_search_filter_query_constructor(
172
170
  and_filter_query = ''
173
171
  for j, and_filter in enumerate(and_filters):
174
172
  and_filter_query += and_filter
175
- if j != len(and_filter_query) - 1:
173
+ if j != len(and_filters) - 1:
176
174
  and_filter_query += ' AND '
177
175
 
178
176
  expired_at_filter += and_filter_query
179
177
 
180
- if i == len(or_list) - 1:
178
+ if i == len(filters.expired_at) - 1:
181
179
  expired_at_filter += ')'
182
180
  else:
183
181
  expired_at_filter += ' OR '
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: graphiti-core
3
- Version: 0.12.0rc2
3
+ Version: 0.12.0rc4
4
4
  Summary: A temporal graph building library
5
5
  License: Apache-2.0
6
6
  Author: Paul Paliychuk
@@ -22,7 +22,7 @@ Requires-Dist: groq (>=0.2.0) ; extra == "groq"
22
22
  Requires-Dist: neo4j (>=5.23.0)
23
23
  Requires-Dist: numpy (>=1.0.0)
24
24
  Requires-Dist: openai (>=1.53.0)
25
- Requires-Dist: pydantic (>=2.8.2)
25
+ Requires-Dist: pydantic (>=2.11.5)
26
26
  Requires-Dist: python-dotenv (>=1.0.1)
27
27
  Requires-Dist: tenacity (>=9.0.0)
28
28
  Project-URL: Homepage, https://help.getzep.com/graphiti/graphiti/overview
@@ -236,7 +236,7 @@ Graphiti supports Azure OpenAI for both LLM inference and embeddings. To use Azu
236
236
  ```python
237
237
  from openai import AsyncAzureOpenAI
238
238
  from graphiti_core import Graphiti
239
- from graphiti_core.llm_client import OpenAIClient
239
+ from graphiti_core.llm_client import LLMConfig, OpenAIClient
240
240
  from graphiti_core.embedder.openai import OpenAIEmbedder, OpenAIEmbedderConfig
241
241
  from graphiti_core.cross_encoder.openai_reranker_client import OpenAIRerankerClient
242
242
 
@@ -252,12 +252,19 @@ azure_openai_client = AsyncAzureOpenAI(
252
252
  azure_endpoint=azure_endpoint
253
253
  )
254
254
 
255
+ # Create LLM Config with your Azure deployed model names
256
+ azure_llm_config = LLMConfig(
257
+ small_model="gpt-4.1-nano",
258
+ model="gpt-4.1-mini",
259
+ )
260
+
255
261
  # Initialize Graphiti with Azure OpenAI clients
256
262
  graphiti = Graphiti(
257
263
  "bolt://localhost:7687",
258
264
  "neo4j",
259
265
  "password",
260
266
  llm_client=OpenAIClient(
267
+ llm_config=azure_llm_config,
261
268
  client=azure_openai_client
262
269
  ),
263
270
  embedder=OpenAIEmbedder(
@@ -268,6 +275,7 @@ graphiti = Graphiti(
268
275
  ),
269
276
  # Optional: Configure the OpenAI cross encoder with Azure OpenAI
270
277
  cross_encoder=OpenAIRerankerClient(
278
+ llm_config=azure_llm_config,
271
279
  client=azure_openai_client
272
280
  )
273
281
  )
@@ -46,7 +46,7 @@ graphiti_core/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
46
46
  graphiti_core/search/search.py,sha256=XCEYz4-I341eWiZ-czeFlH5hdbHTTLymhHiD153p6DQ,15122
47
47
  graphiti_core/search/search_config.py,sha256=VvKg6AB_RPhoe56DBBXHRBXHThAVJ_OLFCyq_yKof-A,3765
48
48
  graphiti_core/search/search_config_recipes.py,sha256=4GquRphHhJlpXQhAZOySYnCzBWYoTwxlJj44eTOavZQ,7443
49
- graphiti_core/search/search_filters.py,sha256=AT074LfIw3nc-jKtDbHCopkUIk5eY1_HRl6EoHSQsUc,6551
49
+ graphiti_core/search/search_filters.py,sha256=jG30nMWX03xoT9ohgyHNu_Xes8GwjIF2eTv6QaiWMqw,6466
50
50
  graphiti_core/search/search_helpers.py,sha256=G5Ceaq5Pfgx0Weelqgeylp_pUHwiBnINaUYsDbURJbE,2636
51
51
  graphiti_core/search/search_utils.py,sha256=AimBkRgvSFHqAkt1vraTVj_bVAp3JKrR6JUMpoZa8RI,34469
52
52
  graphiti_core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -60,7 +60,7 @@ graphiti_core/utils/maintenance/node_operations.py,sha256=xuXKY0aoe_Idl9Edtb8FxS
60
60
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=mJkw9xLB4W2BsLfC5POr0r-PHWL9SIfNj_l_xu0B5ug,3410
61
61
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
62
  graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=QJX5cG0GSSNF_Mm_yrldr69wjVAbN_MxLhOSznz85Hk,1279
63
- graphiti_core-0.12.0rc2.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
64
- graphiti_core-0.12.0rc2.dist-info/METADATA,sha256=-fYdpjbrMX_KEX-KjyoGONa042ydQ8mlH0henpu9Z9U,15301
65
- graphiti_core-0.12.0rc2.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
66
- graphiti_core-0.12.0rc2.dist-info/RECORD,,
63
+ graphiti_core-0.12.0rc4.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
64
+ graphiti_core-0.12.0rc4.dist-info/METADATA,sha256=FEODHMr5ZUo9ZhPNFNYuSMC_cQjPEgg-0-ulD1aj1r4,15535
65
+ graphiti_core-0.12.0rc4.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
66
+ graphiti_core-0.12.0rc4.dist-info/RECORD,,