imbajin commented on code in PR #415:
URL: https://github.com/apache/hugegraph-ai/pull/415#discussion_r4576303730


##########
hugegraph-llm/src/hugegraph_llm/config/hugegraph_config.py:
##########
@@ -55,6 +55,9 @@ def normalize_graph_url(cls, value):
     max_graph_items: int = 30
     edge_limit_pre_label: int = 8
 
+    # graph element config
+    max_element_id_length: int = 256

Review Comment:
   **⚠️ Reject nonpositive ID length limits**
   
   If `MAX_ELEMENT_ID_LENGTH` is set to `0` or a negative integer, this 
unconstrained setting is accepted, but `valid()` rejects every ID because its 
UTF-8 byte length is always greater than or equal to the limit. 
`_filter_long_id()` then drops all vertices and edges after extraction and 
returns the empty graph with warnings rather than failing the configuration. 
Please validate that the configured limit is positive, and apply the same check 
to the explicit constructor override.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to