Skip to content

Python scraper based on AI

Merge branch 'pre/beta' into 133-support-claude3-haiku-and-others-using-litellm

Marco Perini0ab7272fd72b
diff --cc scrapegraphai/graphs/abstract_graph.py
index a6821c13,83b5b712..aff7289c
--- a/scrapegraphai/graphs/abstract_graph.py
+++ b/scrapegraphai/graphs/abstract_graph.py
@@@ -67,9 -67,17 +67,16 @@@ class AbstractGraph(ABC)
if 'Azure' in str(type(llm)):
try:
self.model_token = models_tokens["azure"][llm.model_name]
- except KeyError as exc:
- raise KeyError("Model not supported") from exc
+ except KeyError:
+ raise KeyError("Model not supported")
-
++
+ elif 'HuggingFaceEndpoint' in str(type(llm)):
+ if 'mistral' in llm.repo_id:
+ try:
+ self.model_token = models_tokens['mistral'][llm.repo_id]
+ except KeyError:
+ raise KeyError("Model not supported")
-
def _create_llm(self, llm_config: dict, chat=False) -> object:
"""
Create a large language model instance based on the configuration provided.