mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
fix: generate answer node omni
This commit is contained in:
parent
928f7040ab
commit
b52e4a390b
@ -22,10 +22,9 @@ graph_config = {
|
||||
# ************************************************
|
||||
# Create the SmartScraperGraph instance and run it
|
||||
# ************************************************
|
||||
|
||||
smart_scraper_graph = SmartScraperGraph(
|
||||
prompt="List me all the titles of the website",
|
||||
source="https://sport.sky.it/nba?gr=www",
|
||||
prompt="Find some information about what does the company do, the name and a contact email.",
|
||||
source="https://scrapegraphai.com/",
|
||||
config=graph_config
|
||||
)
|
||||
|
||||
|
||||
@ -105,7 +105,7 @@ class GenerateAnswerOmniNode(BaseNode):
|
||||
template=template_no_chunk_omni_prompt,
|
||||
input_variables=["question"],
|
||||
partial_variables={
|
||||
"context": chunk,
|
||||
"context": doc,
|
||||
"format_instructions": format_instructions,
|
||||
"img_desc": imag_desc,
|
||||
},
|
||||
|
||||
@ -56,7 +56,7 @@ class GenerateAnswerPDFNode(BaseNode):
|
||||
self.llm_model = node_config["llm_model"]
|
||||
if isinstance(node_config["llm_model"], ChatOllama):
|
||||
self.llm_model.format="json"
|
||||
|
||||
|
||||
self.verbose = (
|
||||
False if node_config is None else node_config.get("verbose", False)
|
||||
)
|
||||
@ -114,7 +114,7 @@ class GenerateAnswerPDFNode(BaseNode):
|
||||
template=template_no_chunks_pdf_prompt,
|
||||
input_variables=["question"],
|
||||
partial_variables={
|
||||
"context":doc,
|
||||
"context": doc,
|
||||
"format_instructions": format_instructions,
|
||||
},
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user