Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
Merge branch 'pre/beta' into refactoring-of-abstract-graph
Marco Vinciguerra8cece1d31bee
diff --cc scrapegraphai/graphs/abstract_graph.pyindex b0da6a53,ab53862d..7a0c4d04--- a/scrapegraphai/graphs/abstract_graph.py+++ b/scrapegraphai/graphs/abstract_graph.py@@@ -161,13 -168,10 +160,12 @@@ class AbstractGraph(ABC)model_name = llm_params["model"].split("/")[-1]return handle_model(model_name, "anthropic", model_name)- if llm_params["model"].startswith("vertexai"):+ elif llm_params["model"].startswith("vertexai"):return handle_model(llm_params["model"], "google_vertexai", llm_params["model"])--- if "ollama" in llm_params["model"]:+ elif "gpt-" in llm_params["model"]:+ return handle_model(llm_params["model"], "openai", llm_params["model"])++ elif "ollama" in llm_params["model"]:model_name = llm_params["model"].split("ollama/")[-1]token_key = model_name if "model_tokens" not in llm_params else llm_params["model_tokens"]return handle_model(model_name, "ollama", token_key)@@@ -196,7 -212,7 +194,8 @@@self.model_token = 8192return ErnieBotChat(llm_params)- if "oneapi" in llm_params["model"]:+ elif "oneapi" in llm_params["model"]:++# take the model after the last dashllm_params["model"] = llm_params["model"].split("/")[-1]try:@@@ -205,7 -221,7 +204,8 @@@raise KeyError("Model not supported") from excreturn OneApi(llm_params)- if "nvidia" in llm_params["model"]:+ elif "nvidia" in llm_params["model"]:++try:self.model_token = models_tokens["nvidia"][llm_params["model"].split("/")[-1]]llm_params["model"] = "/".join(llm_params["model"].split("/")[1:])