Skip to content

Commit 2f02830

Browse files
committed
refactoring of fetch node
1 parent 5664eb2 commit 2f02830

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

examples/local_models/smart_scraper_ollama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
graph_config = {
1111
"llm": {
12-
"model": "ollama/llama3",
12+
"model": "ollama/mistral",
1313
"temperature": 0,
1414
"format": "json", # Ollama needs the format to be specified explicitly
1515
# "base_url": "http://localhost:11434", # set ollama URL arbitrarily

examples/openai/smart_scraper_openai.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,9 @@
3030
# ************************************************
3131

3232
smart_scraper_graph = SmartScraperGraph(
33-
prompt="List me all the projects with their description",
34-
# also accepts a string with the already downloaded HTML code
35-
source="https://perinim.github.io/projects/",
36-
config=graph_config,
33+
prompt="List me all the titles of the articles",
34+
source="https://www.wired.com",
35+
config=graph_config
3736
)
3837

3938
result = smart_scraper_graph.run()

scrapegraphai/nodes/fetch_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def execute(self, state):
170170
parsed_content = convert_to_md(document[0].page_content)
171171

172172
compressed_document = [
173-
Document(page_content=parsed_content, metadata={"source": parsed_content})
173+
Document(page_content=parsed_content, metadata={"source": "html file"})
174174
]
175175

176176
state.update(

0 commit comments

Comments
 (0)