Skip to content

Commit e2350ed

Browse files
committed
feat: add new prompt info
1 parent 106fb12 commit e2350ed

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

scrapegraphai/nodes/generate_answer_csv_node.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def execute(self, state):
111111
following content from a csv.
112112
You are now asked to answer a user question about the content you have scraped.\n
113113
You have scraped many chunks since the csv is big and now you are asked to merge them into a single answer without repetitions (if there are any).\n
114+
Make sure that if a maximum number of items is specified in the instructions that you get that maximum number and do not exceed it. \n
114115
Output instructions: {format_instructions}\n
115116
User question: {question}\n
116117
csv content: {context}\n

scrapegraphai/nodes/generate_answer_node.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,13 @@ class GenerateAnswerNode(BaseNode):
3333
node_name (str): The unique identifier name for the node, defaulting to "GenerateAnswer".
3434
"""
3535

36-
def __init__(self, input: str, output: List[str], node_config: Optional[dict]=None,
36+
def __init__(self, input: str, output: List[str], node_config: Optional[dict] = None,
3737
node_name: str = "GenerateAnswer"):
3838
super().__init__(node_name, "node", input, output, 2, node_config)
39-
39+
4040
self.llm_model = node_config["llm_model"]
41-
self.verbose = False if node_config is None else node_config.get("verbose", False)
41+
self.verbose = False if node_config is None else node_config.get(
42+
"verbose", False)
4243

4344
def execute(self, state: dict) -> dict:
4445
"""
@@ -97,6 +98,7 @@ def execute(self, state: dict) -> dict:
9798
following content from a website.
9899
You are now asked to answer a user question about the content you have scraped.\n
99100
You have scraped many chunks since the website is big and now you are asked to merge them into a single answer without repetitions (if there are any).\n
101+
Make sure that if a maximum number of items is specified in the instructions that you get that maximum number and do not exceed it. \n
100102
Output instructions: {format_instructions}\n
101103
User question: {question}\n
102104
Website content: {context}\n

scrapegraphai/nodes/generate_answer_pdf_node.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def execute(self, state):
111111
following content from a PDF.
112112
You are now asked to answer a user question about the content you have scraped.\n
113113
You have scraped many chunks since the PDF is big and now you are asked to merge them into a single answer without repetitions (if there are any).\n
114+
Make sure that if a maximum number of items is specified in the instructions that you get that maximum number and do not exceed it. \n
114115
Output instructions: {format_instructions}\n
115116
User question: {question}\n
116117
PDF content: {context}\n

0 commit comments

Comments
 (0)