mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-08 11:58:34 +02:00
more renamings
This commit is contained in:
parent
ceaaa05af0
commit
2517aa39b2
@ -27,7 +27,7 @@ logger = setup_logger()
|
||||
test_mode = False
|
||||
|
||||
|
||||
def initial_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
def consolidate_sub_answers_graph_builder() -> StateGraph:
|
||||
graph = StateGraph(
|
||||
state_schema=SQState,
|
||||
input=SQInput,
|
||||
|
@ -3,7 +3,7 @@ from langgraph.graph import START
|
||||
from langgraph.graph import StateGraph
|
||||
|
||||
from onyx.agents.agent_search.deep_search_a.initial.consolidate_sub_answers.graph_builder import (
|
||||
initial_sq_subgraph_builder,
|
||||
consolidate_sub_answers_graph_builder,
|
||||
)
|
||||
from onyx.agents.agent_search.deep_search_a.initial.generate_initial_answer.nodes.consolidate_retrieved_documents import (
|
||||
consolidate_retrieved_documents,
|
||||
@ -28,7 +28,7 @@ from onyx.utils.logger import setup_logger
|
||||
logger = setup_logger()
|
||||
|
||||
|
||||
def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
def generate_initial_answer_graph_builder(test_mode: bool = False) -> StateGraph:
|
||||
graph = StateGraph(
|
||||
state_schema=SearchSQState,
|
||||
input=SearchSQInput,
|
||||
@ -39,10 +39,10 @@ def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
# action=initial_sub_question_creation,
|
||||
# )
|
||||
|
||||
sub_question_answering_subgraph = initial_sq_subgraph_builder().compile()
|
||||
consolidate_sub_answers = consolidate_sub_answers_graph_builder().compile()
|
||||
graph.add_node(
|
||||
node="sub_question_answering_subgraph",
|
||||
action=sub_question_answering_subgraph,
|
||||
node="consolidate_sub_answers",
|
||||
action=consolidate_sub_answers,
|
||||
)
|
||||
|
||||
# answer_query_subgraph = answer_query_graph_builder().compile()
|
||||
@ -88,11 +88,11 @@ def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
|
||||
graph.add_edge(
|
||||
start_key=START,
|
||||
end_key="sub_question_answering_subgraph",
|
||||
end_key="consolidate_sub_answers",
|
||||
)
|
||||
|
||||
graph.add_edge(
|
||||
start_key=["base_raw_search_subgraph", "sub_question_answering_subgraph"],
|
||||
start_key=["base_raw_search_subgraph", "consolidate_sub_answers"],
|
||||
end_key="retrieval_consolidation",
|
||||
)
|
||||
|
||||
|
@ -3,7 +3,7 @@ from langgraph.graph import START
|
||||
from langgraph.graph import StateGraph
|
||||
|
||||
from onyx.agents.agent_search.deep_search_a.initial.generate_initial_answer.graph_builder import (
|
||||
initial_search_sq_subgraph_builder,
|
||||
generate_initial_answer_graph_builder,
|
||||
)
|
||||
from onyx.agents.agent_search.deep_search_a.main.edges import (
|
||||
continue_to_refined_answer_or_end,
|
||||
@ -106,10 +106,10 @@ def main_graph_builder(test_mode: bool = False) -> StateGraph:
|
||||
# action=initial_sub_question_creation,
|
||||
# )
|
||||
|
||||
initial_search_sq_subgraph = initial_search_sq_subgraph_builder().compile()
|
||||
generate_initial_answer_graph = generate_initial_answer_graph_builder().compile()
|
||||
graph.add_node(
|
||||
node="initial_search_sq_subgraph",
|
||||
action=initial_search_sq_subgraph,
|
||||
node="generate_initial_answer_graph",
|
||||
action=generate_initial_answer_graph,
|
||||
)
|
||||
|
||||
# answer_query_subgraph = answer_query_graph_builder().compile()
|
||||
@ -239,7 +239,7 @@ def main_graph_builder(test_mode: bool = False) -> StateGraph:
|
||||
|
||||
graph.add_edge(
|
||||
start_key="agent_search_start",
|
||||
end_key="initial_search_sq_subgraph",
|
||||
end_key="generate_initial_answer_graph",
|
||||
)
|
||||
# graph.add_edge(
|
||||
# start_key="agent_search_start",
|
||||
@ -316,7 +316,7 @@ def main_graph_builder(test_mode: bool = False) -> StateGraph:
|
||||
# )
|
||||
|
||||
graph.add_edge(
|
||||
start_key=["initial_search_sq_subgraph", "entity_term_extraction_llm"],
|
||||
start_key=["generate_initial_answer_graph", "entity_term_extraction_llm"],
|
||||
end_key="refined_answer_decision",
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user