Skip to content

Commit 23bc633

Browse files
committed
fixed a bug
1 parent 6d78375 commit 23bc633

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: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

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

3030
smart_scraper_graph = SmartScraperGraph(
3131
prompt="List me all the titles of the articles",
32-
# also accepts a string with the already downloaded HTML code
33-
source="https://www.wired.com/",
32+
source="https://www.wired.com",
3433
config=graph_config
3534
)
3635

examples/local_models/smart_scraper_schema_ollama.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ class Projects(BaseModel):
1919

2020
graph_config = {
2121
"llm": {
22-
"model": "ollama/mistral",
22+
"model": "ollama/llama3",
2323
"temperature": 0,
2424
"format": "json", # Ollama needs the format to be specified explicitly
2525
# "base_url": "http://localhost:11434", # set ollama URL arbitrarily

scrapegraphai/nodes/fetch_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,10 @@ def execute(self, state):
167167
if not document or not document[0].page_content.strip():
168168
raise ValueError("No HTML body content found in the document fetched by ChromiumLoader.")
169169

170-
parsed_content = convert_to_md(source)
170+
parsed_content = convert_to_md(document[0].page_content)
171171

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

176176
state.update(

0 commit comments

Comments
 (0)