Skip to content

Python scraper based on AI

Merge pull request #303 from VinciGit00/295-scrapegraph-ai接入oneapi模型qwen-turbo

Marco Vinciguerra1d958be44ddd
diff --cc scrapegraphai/graphs/abstract_graph.py
index 61519579,3f5de3a2..7814efa8
--- a/scrapegraphai/graphs/abstract_graph.py
+++ b/scrapegraphai/graphs/abstract_graph.py
@@@ -99,19 -100,9 +101,19 @@@ class AbstractGraph(ABC)
"llm_model": self.llm_model,
"embedder_model": self.embedder_model
}
-
+
self.set_common_params(common_params, overwrite=False)
+ # set burr config
+ self.burr_kwargs = config.get("burr_kwargs", None)
+ if self.burr_kwargs is not None:
+ self.graph.use_burr = True
+ if "app_instance_id" not in self.burr_kwargs:
+ # set a random uuid for the app_instance_id to avoid conflicts
+ self.burr_kwargs["app_instance_id"] = str(uuid.uuid4())
+
+ self.graph.burr_config = self.burr_kwargs
+
def set_common_params(self, params: dict, overwrite=False):
"""
Pass parameters to every node in the graph unless otherwise defined in the graph.