You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,10 @@
6
6
7
7
- MarkdownLoader (experimental): added a Markdown loader to support `.md` and `.markdown` files.
8
8
9
+
### Fixed
10
+
11
+
-`NodeType`: a node type defined without a `properties` key (e.g. `{"label": "Person"}` or `{"label": "Person", "description": "..."}`) now automatically gets a default `name: STRING` property and `additional_properties=True`, preventing a `ValidationError` from the `min_length=1` constraint. This matches the existing behaviour for string input. Auto-addition is skipped when `properties` is explicitly provided (including as an empty list) or when `additional_properties` is explicitly set to `False`.
12
+
9
13
### Changed
10
14
11
15
- SimpleKG pipeline (experimental): the `from_pdf` parameter is deprecated in favor of `from_file` (PDF and Markdown inputs). `from_pdf` still works but emits a deprecation warning and will be removed in a future version.
@@ -912,19 +912,32 @@ For improved reliability with :ref:`OpenAILLM <openaillm>` or :ref:`VertexAILLM
912
912
Schema Validation and Node Properties
913
913
--------------------------------------
914
914
915
-
**Important:** All node types must have at least one property defined. When using string shorthand for node types (e.g., ``"Person"``), a default ``"name"`` property is automatically added with ``additional_properties=True`` to allow flexible LLM extraction:
915
+
All node types must have at least one property defined. When no properties are provided,
916
+
a default ``name: STRING`` property is added automatically and ``additional_properties``
917
+
is set to ``True`` to allow the LLM to extract additional properties freely.
918
+
919
+
This applies to both the **string shorthand** and the **long dict syntax** when the
Passing ``properties`` explicitly as an empty list raises a ``ValidationError``:
936
+
937
+
.. code:: python
938
+
939
+
# Raises ValidationError — empty list is not auto-filled
940
+
{"label": "House", "properties": []}
928
941
929
942
**Relationship types** with no properties automatically set ``additional_properties=True`` to preserve LLM-extracted properties during graph construction.
0 commit comments