File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/neo4j_graphrag/experimental/pipeline/config/template_pipeline Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 37
37
from neo4j_graphrag .experimental .components .text_splitters .fixed_size_splitter import (
38
38
FixedSizeSplitter ,
39
39
)
40
- from neo4j_graphrag .experimental .components .types import LexicalGraphConfig
40
+ from neo4j_graphrag .experimental .components .types import (
41
+ LexicalGraphConfig ,
42
+ SchemaEnforcementMode
43
+ )
41
44
from neo4j_graphrag .experimental .pipeline .config .object_config import ComponentType
42
45
from neo4j_graphrag .experimental .pipeline .config .template_pipeline .base import (
43
46
TemplatePipelineConfig ,
@@ -71,6 +74,7 @@ class SimpleKGPipelineConfig(TemplatePipelineConfig):
71
74
entities : Sequence [EntityInputType ] = []
72
75
relations : Sequence [RelationInputType ] = []
73
76
potential_schema : Optional [list [tuple [str , str , str ]]] = None
77
+ enforce_schema : SchemaEnforcementMode = SchemaEnforcementMode .NONE
74
78
on_error : OnError = OnError .IGNORE
75
79
prompt_template : Union [ERExtractionTemplate , str ] = ERExtractionTemplate ()
76
80
perform_entity_resolution : bool = True
@@ -124,6 +128,7 @@ def _get_extractor(self) -> EntityRelationExtractor:
124
128
return LLMEntityRelationExtractor (
125
129
llm = self .get_default_llm (),
126
130
prompt_template = self .prompt_template ,
131
+ enforce_schema = self .enforce_schema ,
127
132
on_error = self .on_error ,
128
133
)
129
134
You can’t perform that action at this time.
0 commit comments