mirror of
https://github.com/trustgraph-ai/trustgraph.git
synced 2026-07-21 19:21:03 +02:00
Add safety valve for path_size set too high
This commit is contained in:
parent
7d7b2686f1
commit
59cc86602c
1 changed files with 4 additions and 0 deletions
|
|
@ -93,6 +93,10 @@ class Query:
|
||||||
if path_length <= 0:
|
if path_length <= 0:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
# Stop spanning around if the subgraph is already maxed out
|
||||||
|
if len(subgraph) >= self.max_subgraph_size:
|
||||||
|
return
|
||||||
|
|
||||||
res = self.rag.triples_client.request(
|
res = self.rag.triples_client.request(
|
||||||
user=self.user, collection=self.collection,
|
user=self.user, collection=self.collection,
|
||||||
s=ent, p=None, o=None,
|
s=ent, p=None, o=None,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue