Python scraper based on AI
Python ai-crawlerai-scrapingai-searchcrawlerdata-extractionfirecrawl-alternativelarge-language-modelllmmarkdownragscrapingscraping-pythonweb-crawlerweb-crawlersweb-dataweb-data-extractionweb-scraperweb-scrapingweb-searchwebscraping
removed unused function
Marco Vinciguerracf2734392cda
diff --git a/scrapegraphai/nodes/generate_answer_node.py b/scrapegraphai/nodes/generate_answer_node.pyindex 9cd5dce5..d864124e 100644--- a/scrapegraphai/nodes/generate_answer_node.py+++ b/scrapegraphai/nodes/generate_answer_node.py@@ -7,7 +7,6 @@ from langchain.prompts import PromptTemplatefrom langchain_core.output_parsers import JsonOutputParserfrom langchain_core.runnables import RunnableParallelfrom tqdm import tqdm-from ..utils.merge_results import merge_resultsfrom ..utils.logging import get_loggerfrom ..models import Ollama, OpenAIfrom .base_node import BaseNodediff --git a/scrapegraphai/utils/__init__.py b/scrapegraphai/utils/__init__.pyindex 15fd6886..707d2b18 100644--- a/scrapegraphai/utils/__init__.py+++ b/scrapegraphai/utils/__init__.py@@ -11,4 +11,3 @@ from .sys_dynamic_import import dynamic_import, srcfile_importfrom .cleanup_html import cleanup_htmlfrom .logging import *from .convert_to_md import convert_to_md-from .merge_results import merge_resultsdiff --git a/scrapegraphai/utils/merge_results.py b/scrapegraphai/utils/merge_results.pydeleted file mode 100644index ff5728fa..00000000--- a/scrapegraphai/utils/merge_results.py+++ /dev/null@@ -1,30 +0,0 @@-def merge_results(batch_answers):- """- Merges the results from single-chunk processing and batch processing, and adds separators between the chunks.- Parameters:- ------------ answers : list of str- A list of strings containing the results from single-chunk processing.-- batch_answers : list of dict- A list of dictionaries, where each dictionary contains a key "text" with the batch processing result as a string.-- Returns:- --------- str- A single string containing all merged results, with each result separated by a newline character.-- Example:- --------- >>> answers = ["Result from single-chunk 1", "Result from single-chunk 2"]- >>> batch_answers = [{"text": "Result from batch 1"}, {"text": "Result from batch 2"}]- >>> merge_results(answers, batch_answers)- 'Result from single-chunk 1\nResult from single-chunk 2\nResult from batch 1\nResult from batch 2'- """- # Combine answers from single-chunk processing and batch processing- merged_answers = [answer["text"] for answer in batch_answers]-- # Add separators between chunks- merged_answers = "\n".join(merged_answers)-- return merged_answers\ No newline at end of file