graphiti-core 0.3.12__tar.gz → 0.3.13__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.3.12 → graphiti_core-0.3.13}/PKG-INFO +1 -1
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/search/search_utils.py +12 -1
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/pyproject.toml +1 -1
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/LICENSE +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/README.md +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/__init__.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/edges.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/embedder/__init__.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/embedder/client.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/embedder/openai.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/embedder/voyage.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/errors.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/graphiti.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/helpers.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/__init__.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/anthropic_client.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/client.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/config.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/errors.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/groq_client.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/openai_client.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/llm_client/utils.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/nodes.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/__init__.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/dedupe_edges.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/dedupe_nodes.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/eval.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/extract_edge_dates.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/extract_edges.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/extract_nodes.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/invalidate_edges.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/lib.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/models.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/prompts/summarize_nodes.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/py.typed +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/search/__init__.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/search/search.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/search/search_config.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/search/search_config_recipes.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/__init__.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/bulk_utils.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/__init__.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/community_operations.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/edge_operations.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/graph_data_operations.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/node_operations.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/temporal_operations.py +0 -0
- {graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/utils.py +0 -0
|
@@ -37,6 +37,7 @@ logger = logging.getLogger(__name__)
|
|
|
37
37
|
RELEVANT_SCHEMA_LIMIT = 3
|
|
38
38
|
DEFAULT_MIN_SCORE = 0.6
|
|
39
39
|
DEFAULT_MMR_LAMBDA = 0.5
|
|
40
|
+
MAX_QUERY_LENGTH = 512
|
|
40
41
|
|
|
41
42
|
|
|
42
43
|
def fulltext_query(query: str, group_ids: list[str] | None = None):
|
|
@@ -50,7 +51,11 @@ def fulltext_query(query: str, group_ids: list[str] | None = None):
|
|
|
50
51
|
group_ids_filter += ' AND ' if group_ids_filter else ''
|
|
51
52
|
|
|
52
53
|
lucene_query = lucene_sanitize(query)
|
|
53
|
-
|
|
54
|
+
# If the lucene query is too long return no query
|
|
55
|
+
if len(lucene_query.split(' ')) + len(group_ids or '') >= MAX_QUERY_LENGTH:
|
|
56
|
+
return ''
|
|
57
|
+
|
|
58
|
+
full_query = group_ids_filter + '(' + lucene_query + ')'
|
|
54
59
|
|
|
55
60
|
return full_query
|
|
56
61
|
|
|
@@ -126,6 +131,8 @@ async def edge_fulltext_search(
|
|
|
126
131
|
) -> list[EntityEdge]:
|
|
127
132
|
# fulltext search over facts
|
|
128
133
|
fuzzy_query = fulltext_query(query, group_ids)
|
|
134
|
+
if fuzzy_query == '':
|
|
135
|
+
return []
|
|
129
136
|
|
|
130
137
|
cypher_query = Query("""
|
|
131
138
|
CALL db.index.fulltext.queryRelationships("edge_name_and_fact", $query)
|
|
@@ -219,6 +226,8 @@ async def node_fulltext_search(
|
|
|
219
226
|
) -> list[EntityNode]:
|
|
220
227
|
# BM25 search to get top nodes
|
|
221
228
|
fuzzy_query = fulltext_query(query, group_ids)
|
|
229
|
+
if fuzzy_query == '':
|
|
230
|
+
return []
|
|
222
231
|
|
|
223
232
|
records, _, _ = await driver.execute_query(
|
|
224
233
|
"""
|
|
@@ -286,6 +295,8 @@ async def community_fulltext_search(
|
|
|
286
295
|
) -> list[CommunityNode]:
|
|
287
296
|
# BM25 search to get top communities
|
|
288
297
|
fuzzy_query = fulltext_query(query, group_ids)
|
|
298
|
+
if fuzzy_query == '':
|
|
299
|
+
return []
|
|
289
300
|
|
|
290
301
|
records, _, _ = await driver.execute_query(
|
|
291
302
|
"""
|
|
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
|
|
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.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/edge_operations.py
RENAMED
|
File without changes
|
|
File without changes
|
{graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/node_operations.py
RENAMED
|
File without changes
|
{graphiti_core-0.3.12 → graphiti_core-0.3.13}/graphiti_core/utils/maintenance/temporal_operations.py
RENAMED
|
File without changes
|
|
File without changes
|