11import logging
22import warnings
3- import time
43from falkordb import FalkorDB
54from typing import Optional , Union
65from graphrag_sdk .ontology import Ontology
@@ -203,16 +202,15 @@ def list_sources(self) -> list[AbstractSource]:
203202 return [s .source for s in self .sources ]
204203
205204 def process_sources (
206- self , sources : list [AbstractSource ], instructions : Optional [str ] = None , hide_progress : Optional [bool ] = False , delay : Optional [ float ] = 0
205+ self , sources : list [AbstractSource ], instructions : Optional [str ] = None , hide_progress : Optional [bool ] = False
207206 ) -> None :
208207 """
209208 Add entities and relations found in sources into the knowledge-graph
210209
211210 Args:
212- sources (list[AbstractSource]): list of sources to extract knowledge from
211+ sources (list[AbstractSource]): list of sources to extract knowledge from
213212 instructions (Optional[str]): Instructions for processing.
214213 hide_progress (Optional[bool]): hide progress bar
215- delay (float): seconds to delay each iteration through sources to avoid rate limits
216214 """
217215
218216 if self .ontology is None :
@@ -221,11 +219,6 @@ def process_sources(
221219 # Create graph with sources
222220 self ._create_graph_with_sources (sources , instructions , hide_progress )
223221
224- # Add processed sources
225- for src in sources :
226- self .sources .add (src )
227- time .sleep (delay )
228-
229222
230223 def _create_graph_with_sources (
231224 self , sources : Optional [list [AbstractSource ]] = None , instructions : Optional [str ] = None , hide_progress : Optional [bool ] = False
0 commit comments