Skip to content

Commit 7eda6bc

Browse files
committed
fix: issue about parser
1 parent f9b121f commit 7eda6bc

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

scrapegraphai/nodes/generate_answer_node.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,12 @@ def execute(self, state: dict) -> dict:
9696
output_parser = get_structured_output_parser(self.node_config["schema"])
9797
format_instructions = "NA"
9898
else:
99-
if not isinstance(self.llm_model, ChatBedrock):
100-
output_parser = get_pydantic_output_parser(self.node_config["schema"])
101-
format_instructions = output_parser.get_format_instructions()
99+
output_parser = get_pydantic_output_parser(self.node_config["schema"])
100+
format_instructions = output_parser.get_format_instructions()
102101

103102
else:
104-
if not isinstance(self.llm_model, ChatBedrock):
105-
output_parser = JsonOutputParser()
106-
format_instructions = output_parser.get_format_instructions()
103+
output_parser = JsonOutputParser()
104+
format_instructions = output_parser.get_format_instructions()
107105

108106
if isinstance(self.llm_model, (ChatOpenAI, AzureChatOpenAI)) \
109107
and not self.script_creator \

scrapegraphai/utils/research_web.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ def search_on_web(query: str, search_engine: str = "Google",
6060

6161
elif search_engine.lower() == "searxng":
6262
url = f"http://localhost:{port}"
63-
params = {"q": query, "format": "json"}
63+
params = {"q": query,
64+
"format": "json",
65+
"engines": "google,duckduckgo,brave,qwant,bing"}
6466

6567
response = requests.get(url, params=params)
6668

0 commit comments

Comments
 (0)