Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
fixed ollama embedder params
EURAC\marperiniac099e276383
diff --git a/examples/local_models/Docker/smart_scraper_docker.py b/examples/local_models/Docker/smart_scraper_docker.pyindex 5eb3eb82..9e64aed9 100644--- a/examples/local_models/Docker/smart_scraper_docker.py+++ b/examples/local_models/Docker/smart_scraper_docker.py@@ -10,14 +10,14 @@ from scrapegraphai.utils import prettify_exec_infograph_config = {"llm": {- "model": "ollama/mistral",+ "model": "ollama/llama3","temperature": 0,"format": "json",- # "model_tokens": 2000, # set context length arbitrarily,+ "model_tokens": 2000, # set context length arbitrarily,},"embeddings": {"model": "ollama/nomic-embed-text",- "temperature": 0,+ "base_url": "http://localhost:11434",}}diff --git a/scrapegraphai/nodes/rag_node.py b/scrapegraphai/nodes/rag_node.pyindex b725cd8a..b5d5433f 100644--- a/scrapegraphai/nodes/rag_node.py+++ b/scrapegraphai/nodes/rag_node.py@@ -92,7 +92,13 @@ class RAGNode(BaseNode):elif isinstance(embedding_model, AzureOpenAI):embeddings = AzureOpenAIEmbeddings()elif isinstance(embedding_model, Ollama):- embeddings = OllamaEmbeddings(model=embedding_model.model)+ # unwrap the kwargs from the model whihc is a dict+ params = embedding_model._lc_kwargs+ # remove streaming and temperature+ params.pop("streaming", None)+ params.pop("temperature", None)++ embeddings = OllamaEmbeddings(**params)elif isinstance(embedding_model, HuggingFace):embeddings = HuggingFaceHubEmbeddings(model=embedding_model.model)else: