File tree Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Expand file tree Collapse file tree 4 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 22Example of custom graph using existing nodes
33"""
44
5- from scrapegraphai . models import Ollama
5+ from langchain_community . chat_models import ChatOllama
66from scrapegraphai .nodes import RobotsNode
77
88# ************************************************
2626# Define the node
2727# ************************************************
2828
29- llm_model = Ollama (graph_config ["llm" ])
29+ llm_model = ChatOllama (graph_config ["llm" ])
3030
3131robots_node = RobotsNode (
3232 input = "url" ,
Original file line number Diff line number Diff line change 11import pytest
22from unittest .mock import MagicMock
3-
4- from scrapegraphai .models import Ollama
3+ from langchain_community .chat_models import ChatOllama
54from scrapegraphai .nodes import RobotsNode
65
76@pytest .fixture
Original file line number Diff line number Diff line change 11import unittest
2- from scrapegraphai . models import Ollama
2+ from langchain_community . chat_models import ChatOllama
33from scrapegraphai .nodes import SearchInternetNode
44
55class TestSearchInternetNode (unittest .TestCase ):
@@ -18,7 +18,7 @@ def setUp(self):
1818 }
1919
2020 # Define the model
21- self .llm_model = Ollama (self .graph_config ["llm" ])
21+ self .llm_model = ChatOllama (self .graph_config ["llm" ])
2222
2323 # Initialize the SearchInternetNode
2424 self .search_node = SearchInternetNode (
Original file line number Diff line number Diff line change 11import pytest
2- from scrapegraphai . models import Ollama
2+ from langchain_community . chat_models import ChatOllama
33from scrapegraphai .nodes import SearchLinkNode
44from unittest .mock import patch , MagicMock
55
@@ -18,7 +18,7 @@ def setup():
1818 }
1919
2020 # Instantiate the LLM model with the configuration
21- llm_model = Ollama (graph_config ["llm" ])
21+ llm_model = ChatOllama (graph_config ["llm" ])
2222
2323 # Define the SearchLinkNode with necessary configurations
2424 search_link_node = SearchLinkNode (
You can’t perform that action at this time.
0 commit comments