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 2
2
Example of custom graph using existing nodes
3
3
"""
4
4
5
- from scrapegraphai . models import Ollama
5
+ from langchain_community . chat_models import ChatOllama
6
6
from scrapegraphai .nodes import RobotsNode
7
7
8
8
# ************************************************
26
26
# Define the node
27
27
# ************************************************
28
28
29
- llm_model = Ollama (graph_config ["llm" ])
29
+ llm_model = ChatOllama (graph_config ["llm" ])
30
30
31
31
robots_node = RobotsNode (
32
32
input = "url" ,
Original file line number Diff line number Diff line change 1
1
import pytest
2
2
from unittest .mock import MagicMock
3
-
4
- from scrapegraphai .models import Ollama
3
+ from langchain_community .chat_models import ChatOllama
5
4
from scrapegraphai .nodes import RobotsNode
6
5
7
6
@pytest .fixture
Original file line number Diff line number Diff line change 1
1
import unittest
2
- from scrapegraphai . models import Ollama
2
+ from langchain_community . chat_models import ChatOllama
3
3
from scrapegraphai .nodes import SearchInternetNode
4
4
5
5
class TestSearchInternetNode (unittest .TestCase ):
@@ -18,7 +18,7 @@ def setUp(self):
18
18
}
19
19
20
20
# Define the model
21
- self .llm_model = Ollama (self .graph_config ["llm" ])
21
+ self .llm_model = ChatOllama (self .graph_config ["llm" ])
22
22
23
23
# Initialize the SearchInternetNode
24
24
self .search_node = SearchInternetNode (
Original file line number Diff line number Diff line change 1
1
import pytest
2
- from scrapegraphai . models import Ollama
2
+ from langchain_community . chat_models import ChatOllama
3
3
from scrapegraphai .nodes import SearchLinkNode
4
4
from unittest .mock import patch , MagicMock
5
5
@@ -18,7 +18,7 @@ def setup():
18
18
}
19
19
20
20
# Instantiate the LLM model with the configuration
21
- llm_model = Ollama (graph_config ["llm" ])
21
+ llm_model = ChatOllama (graph_config ["llm" ])
22
22
23
23
# Define the SearchLinkNode with necessary configurations
24
24
search_link_node = SearchLinkNode (
You can’t perform that action at this time.
0 commit comments