From 1c661fd84991a44e042a7e559393caa7e72ab16e Mon Sep 17 00:00:00 2001 From: Tomaz Bratanic Date: Sat, 15 Jun 2024 12:33:26 -0700 Subject: [PATCH] Improve llm graph transformer docstring (#22939) --- .../langchain_experimental/graph_transformers/llm.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/experimental/langchain_experimental/graph_transformers/llm.py b/libs/experimental/langchain_experimental/graph_transformers/llm.py index 10c65ef7b9c..56e3010f52f 100644 --- a/libs/experimental/langchain_experimental/graph_transformers/llm.py +++ b/libs/experimental/langchain_experimental/graph_transformers/llm.py @@ -610,6 +610,13 @@ class LLMGraphTransformer: strict_mode (bool, optional): Determines whether the transformer should apply filtering to strictly adhere to `allowed_nodes` and `allowed_relationships`. Defaults to True. + node_properties (Union[bool, List[str]]): If True, the LLM can extract any + node properties from text. Alternatively, a list of valid properties can + be provided for the LLM to extract, restricting extraction to those specified. + relationship_properties (Union[bool, List[str]]): If True, the LLM can extract + any relationship properties from text. Alternatively, a list of valid + properties can be provided for the LLM to extract, restricting extraction to + those specified. Example: .. code-block:: python