mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-06 21:11:37 +08:00
fixed doc bugs and removed unused rag node
This commit is contained in:
parent
3bf9c3c9e6
commit
597f2acd07
@ -62,7 +62,7 @@ class CSVScraperMultiGraph(AbstractGraph):
|
||||
"""
|
||||
|
||||
# ************************************************
|
||||
# Create a SmartScraperGraph instance
|
||||
# Create a CSVScraperGraph instance
|
||||
# ************************************************
|
||||
|
||||
smart_scraper_instance = CSVScraperGraph(
|
||||
|
||||
@ -10,7 +10,6 @@ from ..nodes import (
|
||||
FetchNode,
|
||||
SearchLinkNode,
|
||||
ParseNode,
|
||||
RAGNode,
|
||||
GenerateAnswerNode,
|
||||
GraphIteratorNode,
|
||||
MergeAnswersNode
|
||||
@ -79,13 +78,7 @@ class DeepScraperGraph(AbstractGraph):
|
||||
"chunk_size": self.model_token
|
||||
}
|
||||
)
|
||||
rag_node = RAGNode(
|
||||
input="user_prompt & (parsed_doc | doc)",
|
||||
output=["relevant_chunks"],
|
||||
node_config={
|
||||
"llm_model": self.llm_model,
|
||||
}
|
||||
)
|
||||
|
||||
generate_answer_node = GenerateAnswerNode(
|
||||
input="user_prompt & (relevant_chunks | parsed_doc | doc)",
|
||||
output=["answer"],
|
||||
@ -123,7 +116,6 @@ class DeepScraperGraph(AbstractGraph):
|
||||
nodes=[
|
||||
fetch_node,
|
||||
parse_node,
|
||||
rag_node,
|
||||
generate_answer_node,
|
||||
search_node,
|
||||
graph_iterator_node,
|
||||
@ -131,9 +123,6 @@ class DeepScraperGraph(AbstractGraph):
|
||||
],
|
||||
edges=[
|
||||
(fetch_node, parse_node),
|
||||
(parse_node, rag_node),
|
||||
(rag_node, generate_answer_node),
|
||||
(rag_node, search_node),
|
||||
(search_node, graph_iterator_node),
|
||||
(graph_iterator_node, merge_answers_node)
|
||||
],
|
||||
|
||||
@ -58,7 +58,7 @@ class JSONScraperGraph(AbstractGraph):
|
||||
input="json | json_dir",
|
||||
output=["doc", "link_urls", "img_urls"],
|
||||
)
|
||||
|
||||
|
||||
generate_answer_node = GenerateAnswerNode(
|
||||
input="user_prompt & (relevant_chunks | parsed_doc | doc)",
|
||||
output=["answer"],
|
||||
|
||||
@ -63,7 +63,7 @@ class JSONScraperMultiGraph(AbstractGraph):
|
||||
"""
|
||||
|
||||
# ************************************************
|
||||
# Create a SmartScraperGraph instance
|
||||
# Create a JSONScraperGraph instance
|
||||
# ************************************************
|
||||
|
||||
smart_scraper_instance = JSONScraperGraph(
|
||||
|
||||
@ -58,7 +58,6 @@ class MDScraperMultiGraph(AbstractGraph):
|
||||
Returns:
|
||||
BaseGraph: A graph instance representing the web scraping and searching workflow.
|
||||
"""
|
||||
# Create a SmartScraperGraph instance
|
||||
smart_scraper_instance = MDScraperGraph(
|
||||
prompt="",
|
||||
source="",
|
||||
|
||||
@ -85,7 +85,7 @@ class OmniScraperGraph(AbstractGraph):
|
||||
"max_images": self.max_images
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
generate_answer_omni_node = GenerateAnswerOmniNode(
|
||||
input="user_prompt & (relevant_chunks | parsed_doc | doc) & img_desc",
|
||||
output=["answer"],
|
||||
|
||||
@ -62,7 +62,7 @@ class XMLScraperGraph(AbstractGraph):
|
||||
input="xml | xml_dir",
|
||||
output=["doc", "link_urls", "img_urls"]
|
||||
)
|
||||
|
||||
|
||||
generate_answer_node = GenerateAnswerNode(
|
||||
input="user_prompt & (relevant_chunks | doc)",
|
||||
output=["answer"],
|
||||
|
||||
@ -63,7 +63,7 @@ class XMLScraperMultiGraph(AbstractGraph):
|
||||
"""
|
||||
|
||||
# ************************************************
|
||||
# Create a SmartScraperGraph instance
|
||||
# Create a XMLScraperGraph instance
|
||||
# ************************************************
|
||||
|
||||
smart_scraper_instance = XMLScraperGraph(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user