Skip to content

Commit b52e4a3

Browse files
committed
fix: generate answer node omni
1 parent 928f704 commit b52e4a3

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
@@ -22,10 +22,9 @@
2222
# ************************************************
2323
# Create the SmartScraperGraph instance and run it
2424
# ************************************************
25-
2625
smart_scraper_graph = SmartScraperGraph(
27-
prompt="List me all the titles of the website",
28-
source="https://sport.sky.it/nba?gr=www",
26+
prompt="Find some information about what does the company do, the name and a contact email.",
27+
source="https://scrapegraphai.com/",
2928
config=graph_config
3029
)
3130

scrapegraphai/nodes/generate_answer_omni_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def execute(self, state: dict) -> dict:
105105
template=template_no_chunk_omni_prompt,
106106
input_variables=["question"],
107107
partial_variables={
108-
"context": chunk,
108+
"context": doc,
109109
"format_instructions": format_instructions,
110110
"img_desc": imag_desc,
111111
},

scrapegraphai/nodes/generate_answer_pdf_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def __init__(
5656
self.llm_model = node_config["llm_model"]
5757
if isinstance(node_config["llm_model"], ChatOllama):
5858
self.llm_model.format="json"
59-
59+
6060
self.verbose = (
6161
False if node_config is None else node_config.get("verbose", False)
6262
)
@@ -114,7 +114,7 @@ def execute(self, state):
114114
template=template_no_chunks_pdf_prompt,
115115
input_variables=["question"],
116116
partial_variables={
117-
"context":doc,
117+
"context": doc,
118118
"format_instructions": format_instructions,
119119
},
120120
)

0 commit comments

Comments
 (0)