Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
feat: fix tests
Marco Vinciguerra1db164e9e682
diff --git a/examples/single_node/robot_node.py b/examples/single_node/robot_node.pyindex f51f8649..c2bcbbd1 100644--- a/examples/single_node/robot_node.py+++ b/examples/single_node/robot_node.py@@ -2,7 +2,7 @@Example of custom graph using existing nodes"""-from scrapegraphai.models import Ollama+from langchain_community.chat_models import ChatOllamafrom scrapegraphai.nodes import RobotsNode# ************************************************@@ -26,7 +26,7 @@ graph_config = {# Define the node# ************************************************-llm_model = Ollama(graph_config["llm"])+llm_model = ChatOllama(graph_config["llm"])robots_node = RobotsNode(input="url",diff --git a/tests/nodes/robot_node_test.py b/tests/nodes/robot_node_test.pyindex 00a45b05..62527dda 100644--- a/tests/nodes/robot_node_test.py+++ b/tests/nodes/robot_node_test.py@@ -1,7 +1,6 @@import pytestfrom unittest.mock import MagicMock--from scrapegraphai.models import Ollama+from langchain_community.chat_models import ChatOllamafrom scrapegraphai.nodes import RobotsNode@pytest.fixturediff --git a/tests/nodes/search_internet_node_test.py b/tests/nodes/search_internet_node_test.pyindex db2cbdee..8e198448 100644--- a/tests/nodes/search_internet_node_test.py+++ b/tests/nodes/search_internet_node_test.py@@ -1,5 +1,5 @@import unittest-from scrapegraphai.models import Ollama+from langchain_community.chat_models import ChatOllamafrom scrapegraphai.nodes import SearchInternetNodeclass TestSearchInternetNode(unittest.TestCase):@@ -18,7 +18,7 @@ class TestSearchInternetNode(unittest.TestCase):}# Define the model- self.llm_model = Ollama(self.graph_config["llm"])+ self.llm_model = ChatOllama(self.graph_config["llm"])# Initialize the SearchInternetNodeself.search_node = SearchInternetNode(diff --git a/tests/nodes/search_link_node_test.py b/tests/nodes/search_link_node_test.pyindex 648db4ee..1f8c5a58 100644--- a/tests/nodes/search_link_node_test.py+++ b/tests/nodes/search_link_node_test.py@@ -1,5 +1,5 @@import pytest-from scrapegraphai.models import Ollama+from langchain_community.chat_models import ChatOllamafrom scrapegraphai.nodes import SearchLinkNodefrom unittest.mock import patch, MagicMock@@ -18,7 +18,7 @@ def setup():}# Instantiate the LLM model with the configuration- llm_model = Ollama(graph_config["llm"])+ llm_model = ChatOllama(graph_config["llm"])# Define the SearchLinkNode with necessary configurationssearch_link_node = SearchLinkNode(