From 4d8eddb9cb31e47d7d205f86e34510c9471aba52 Mon Sep 17 00:00:00 2001 From: estelle Date: Thu, 28 Nov 2024 10:14:30 +0100 Subject: [PATCH] Fix JSON --- .../pipeline/simple_kg_pipeline_config.json | 15 ++++++--------- .../experimental/pipeline/config/types.py | 1 + 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/examples/customize/build_graph/pipeline/simple_kg_pipeline_config.json b/examples/customize/build_graph/pipeline/simple_kg_pipeline_config.json index f3519986..fffcc895 100644 --- a/examples/customize/build_graph/pipeline/simple_kg_pipeline_config.json +++ b/examples/customize/build_graph/pipeline/simple_kg_pipeline_config.json @@ -46,15 +46,12 @@ ["Person", "WORKS_FOR", "Organization"], ["Organization", "DIRECTED_BY", "Person"] ], - "components": [ - { - "_name": "text_splitter", - "_class": "text_splitters.fixed_size_splitter.FixedSizeSplitter", - "_params": { - "chunk_size": 100, - "chunk_overlap": 10 - } + "text_splitter": { + "class_": "fixed_size_splitter.FixedSizeSplitter", + "params_": { + "chunk_size": 100, + "chunk_overlap": 10 } - ], + }, "perform_entity_resolution": false } diff --git a/src/neo4j_graphrag/experimental/pipeline/config/types.py b/src/neo4j_graphrag/experimental/pipeline/config/types.py index 36858aa4..547c28cf 100644 --- a/src/neo4j_graphrag/experimental/pipeline/config/types.py +++ b/src/neo4j_graphrag/experimental/pipeline/config/types.py @@ -41,6 +41,7 @@ class ParamFromEnvConfig(ParamToResolveConfig): ParamConfig = Union[ + float, str, ParamFromEnvConfig, dict[str, Any],