mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-04-01 00:18:18 +02:00
addressing nits of EL
This commit is contained in:
parent
9e9bd440f4
commit
812172f1bd
@ -2,7 +2,6 @@ from langgraph.graph import END
|
||||
from langgraph.graph import START
|
||||
from langgraph.graph import StateGraph
|
||||
|
||||
|
||||
from onyx.agents.agent_search.deep_search_a.base_raw_search.graph_builder import (
|
||||
base_raw_search_graph_builder,
|
||||
)
|
||||
@ -21,7 +20,6 @@ from onyx.agents.agent_search.deep_search_a.initial_search_sq_subgraph.states im
|
||||
from onyx.agents.agent_search.deep_search_a.initial_search_sq_subgraph.states import (
|
||||
SearchSQState,
|
||||
)
|
||||
|
||||
from onyx.agents.agent_search.deep_search_a.initial_sub_question_answering.graph_builder import (
|
||||
initial_sq_subgraph_builder,
|
||||
)
|
||||
@ -29,8 +27,6 @@ from onyx.utils.logger import setup_logger
|
||||
|
||||
logger = setup_logger()
|
||||
|
||||
test_mode = False
|
||||
|
||||
|
||||
def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
graph = StateGraph(
|
||||
@ -38,7 +34,6 @@ def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
input=SearchSQInput,
|
||||
)
|
||||
|
||||
|
||||
# graph.add_node(
|
||||
# node="initial_sub_question_creation",
|
||||
# action=initial_sub_question_creation,
|
||||
@ -62,7 +57,6 @@ def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
action=base_raw_search_subgraph,
|
||||
)
|
||||
|
||||
|
||||
graph.add_node(
|
||||
node="retrieval_consolidation",
|
||||
action=retrieval_consolidation,
|
||||
@ -94,13 +88,12 @@ def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
|
||||
graph.add_edge(
|
||||
start_key=START,
|
||||
|
||||
end_key="sub_question_answering_subgraph",
|
||||
)
|
||||
|
||||
graph.add_edge(
|
||||
start_key=["base_raw_search_subgraph", "sub_question_answering_subgraph"],
|
||||
end_key="retrieval_consolidation",
|
||||
end_key="retrieval_consolidation",
|
||||
)
|
||||
|
||||
graph.add_edge(
|
||||
@ -118,7 +111,6 @@ def initial_search_sq_subgraph_builder(test_mode: bool = False) -> StateGraph:
|
||||
# end_key="initial_sub_question_creation",
|
||||
# )
|
||||
|
||||
|
||||
graph.add_edge(
|
||||
start_key="retrieval_consolidation",
|
||||
end_key="generate_initial_answer",
|
||||
|
@ -18,10 +18,12 @@ def ingest_initial_base_retrieval(
|
||||
sub_question_retrieval_stats = (
|
||||
state.base_expanded_retrieval_result.sub_question_retrieval_stats
|
||||
)
|
||||
if sub_question_retrieval_stats is None:
|
||||
sub_question_retrieval_stats = AgentChunkStats()
|
||||
else:
|
||||
sub_question_retrieval_stats = sub_question_retrieval_stats
|
||||
# if sub_question_retrieval_stats is None:
|
||||
# sub_question_retrieval_stats = AgentChunkStats()
|
||||
# else:
|
||||
# sub_question_retrieval_stats = sub_question_retrieval_stats
|
||||
|
||||
sub_question_retrieval_stats = sub_question_retrieval_stats or AgentChunkStats()
|
||||
|
||||
now_end = datetime.now()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user