Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fix: abstract_graph moel token bug
Marco Vinciguerrace6be37fbc10
diff --git a/scrapegraphai/graphs/abstract_graph.py b/scrapegraphai/graphs/abstract_graph.pyindex 7f8ec4ea..ca2b2e81 100644--- a/scrapegraphai/graphs/abstract_graph.py+++ b/scrapegraphai/graphs/abstract_graph.py@@ -148,6 +148,10 @@ class AbstractGraph(ABC):# If model instance is passed directly instead of the model detailsif "model_instance" in llm_params:+ try:+ self.model_token = llm_params["model_tokens"]+ except KeyError as exc:+ raise KeyError("model_tokens not specified") from excreturn llm_params["model_instance"]# Instantiate the language model based on the model name