bitflicker64 commented on code in PR #421:
URL: https://github.com/apache/hugegraph-ai/pull/421#discussion_r4529014612
##########
hugegraph-llm/src/hugegraph_llm/nodes/hugegraph_node/graph_query_node.py:
##########
@@ -326,14 +326,37 @@ def _extract_labels_from_schema(self) -> Tuple[List[str],
List[str]]:
edge_labels = self._extract_label_names(edge_props_str)
return vertex_labels, edge_labels
+ def _format_props_str(self, props: Any, item_type: str) -> str:
+ """Canonical property rendering so the same element always formats to
the same string."""
+ return ", ".join(f"{k}: {self._limit_property_query(v, item_type)}"
for k, v in props.items() if v)
Review Comment:
Important: `if v` drops `0` and `False`, so `_format_graph_from_vertex` now
renders `{name: widget, stock: 0, active: False}` as `P{name: widget}`,
including for the isolated vertices this PR keeps. Skip only `None` and `""`
here so both renderers keep falsy values.
--
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]