fix: generate answer node omni

This commit is contained in:
Marco Vinciguerra 2024-08-07 14:09:02 +02:00
parent 928f7040ab
commit b52e4a390b
3 changed files with 5 additions and 6 deletions

View File

@ -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
)

View File

@ -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,
},

View File

@ -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,
},
)