Skip to content

Commit 1b7b530

Browse files
start of no sub-answer gen search
1 parent c402c58 commit 1b7b530

File tree

2 files changed

+22
-21
lines changed

2 files changed

+22
-21
lines changed

backend/onyx/agent_search/pro_search_b/answer_initial_sub_question/nodes/empty_answer_check.py

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,31 @@
1-
from langchain_core.messages import HumanMessage
2-
from langchain_core.messages import merge_message_runs
3-
41
from onyx.agent_search.pro_search_b.answer_initial_sub_question.states import (
52
AnswerQuestionState,
63
)
74
from onyx.agent_search.pro_search_b.answer_initial_sub_question.states import (
85
QACheckUpdate,
96
)
10-
from onyx.agent_search.shared_graph_utils.prompts import SUB_CHECK_PROMPT
117

128

139
def answer_check(state: AnswerQuestionState) -> QACheckUpdate:
14-
msg = [
15-
HumanMessage(
16-
content=SUB_CHECK_PROMPT.format(
17-
question=state["question"],
18-
base_answer=state["answer"],
19-
)
20-
)
21-
]
10+
# msg = [
11+
# HumanMessage(
12+
# content=SUB_CHECK_PROMPT.format(
13+
# question=state["question"],
14+
# base_answer=state["answer"],
15+
# )
16+
# )
17+
# ]
2218

23-
fast_llm = state["subgraph_fast_llm"]
24-
response = list(
25-
fast_llm.stream(
26-
prompt=msg,
27-
)
28-
)
19+
# fast_llm = state["subgraph_fast_llm"]
20+
# response = list(
21+
# fast_llm.stream(
22+
# prompt=msg,
23+
# )
24+
# )
25+
26+
# quality_str = merge_message_runs(response, chunk_separator="")[0].content
2927

30-
quality_str = merge_message_runs(response, chunk_separator="")[0].content
28+
quality_str = "yes"
3129

3230
return QACheckUpdate(
3331
answer_quality=quality_str,

backend/onyx/agent_search/run_graph.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from onyx.agent_search.basic.graph_builder import basic_graph_builder
1313
from onyx.agent_search.basic.states import BasicInput
1414
from onyx.agent_search.models import AgentDocumentCitations
15-
from onyx.agent_search.pro_search_a.main.graph_builder import main_graph_builder
16-
from onyx.agent_search.pro_search_a.main.states import MainInput
15+
from onyx.agent_search.pro_search_b.main.graph_builder import main_graph_builder
16+
from onyx.agent_search.pro_search_b.main.states import MainInput
1717
from onyx.agent_search.shared_graph_utils.utils import get_test_config
1818
from onyx.chat.llm_response_handler import LLMResponseHandlerManager
1919
from onyx.chat.models import AgentAnswerPiece
@@ -34,6 +34,9 @@
3434
from onyx.tools.tool_runner import ToolCallKickoff
3535
from onyx.utils.logger import setup_logger
3636

37+
# from onyx.agent_search.pro_search_a.main.graph_builder import main_graph_builder
38+
# from onyx.agent_search.pro_search_a.main.states import MainInput
39+
3740
logger = setup_logger()
3841

3942
_COMPILED_GRAPH: CompiledStateGraph | None = None

0 commit comments

Comments
 (0)