graphiti-core 0.12.0rc5__py3-none-any.whl → 0.12.2__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.

@@ -18,9 +18,8 @@ import logging
18
18
  from collections import defaultdict
19
19
  from time import time
20
20
 
21
- from neo4j import AsyncDriver
22
-
23
21
  from graphiti_core.cross_encoder.client import CrossEncoderClient
22
+ from graphiti_core.driver.driver import GraphDriver
24
23
  from graphiti_core.edges import EntityEdge
25
24
  from graphiti_core.errors import SearchRerankerError
26
25
  from graphiti_core.graphiti_types import GraphitiClients
@@ -94,7 +93,7 @@ async def search(
94
93
  )
95
94
 
96
95
  # if group_ids is empty, set it to None
97
- group_ids = group_ids if group_ids else None
96
+ group_ids = group_ids if group_ids and group_ids != [''] else None
98
97
  edges, nodes, episodes, communities = await semaphore_gather(
99
98
  edge_search(
100
99
  driver,
@@ -160,7 +159,7 @@ async def search(
160
159
 
161
160
 
162
161
  async def edge_search(
163
- driver: AsyncDriver,
162
+ driver: GraphDriver,
164
163
  cross_encoder: CrossEncoderClient,
165
164
  query: str,
166
165
  query_vector: list[float],
@@ -174,7 +173,6 @@ async def edge_search(
174
173
  ) -> list[EntityEdge]:
175
174
  if config is None:
176
175
  return []
177
-
178
176
  search_results: list[list[EntityEdge]] = list(
179
177
  await semaphore_gather(
180
178
  *[
@@ -261,7 +259,7 @@ async def edge_search(
261
259
 
262
260
 
263
261
  async def node_search(
264
- driver: AsyncDriver,
262
+ driver: GraphDriver,
265
263
  cross_encoder: CrossEncoderClient,
266
264
  query: str,
267
265
  query_vector: list[float],
@@ -275,7 +273,6 @@ async def node_search(
275
273
  ) -> list[EntityNode]:
276
274
  if config is None:
277
275
  return []
278
-
279
276
  search_results: list[list[EntityNode]] = list(
280
277
  await semaphore_gather(
281
278
  *[
@@ -344,7 +341,7 @@ async def node_search(
344
341
 
345
342
 
346
343
  async def episode_search(
347
- driver: AsyncDriver,
344
+ driver: GraphDriver,
348
345
  cross_encoder: CrossEncoderClient,
349
346
  query: str,
350
347
  _query_vector: list[float],
@@ -356,7 +353,6 @@ async def episode_search(
356
353
  ) -> list[EpisodicNode]:
357
354
  if config is None:
358
355
  return []
359
-
360
356
  search_results: list[list[EpisodicNode]] = list(
361
357
  await semaphore_gather(
362
358
  *[
@@ -392,7 +388,7 @@ async def episode_search(
392
388
 
393
389
 
394
390
  async def community_search(
395
- driver: AsyncDriver,
391
+ driver: GraphDriver,
396
392
  cross_encoder: CrossEncoderClient,
397
393
  query: str,
398
394
  query_vector: list[float],