File tree Expand file tree Collapse file tree 2 files changed +22
-21
lines changed
backend/onyx/agent_search
pro_search_b/answer_initial_sub_question/nodes Expand file tree Collapse file tree 2 files changed +22
-21
lines changed Original file line number Diff line number Diff line change 1
- from langchain_core .messages import HumanMessage
2
- from langchain_core .messages import merge_message_runs
3
-
4
1
from onyx .agent_search .pro_search_b .answer_initial_sub_question .states import (
5
2
AnswerQuestionState ,
6
3
)
7
4
from onyx .agent_search .pro_search_b .answer_initial_sub_question .states import (
8
5
QACheckUpdate ,
9
6
)
10
- from onyx .agent_search .shared_graph_utils .prompts import SUB_CHECK_PROMPT
11
7
12
8
13
9
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
+ # ]
22
18
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
29
27
30
- quality_str = merge_message_runs ( response , chunk_separator = "" )[ 0 ]. content
28
+ quality_str = "yes"
31
29
32
30
return QACheckUpdate (
33
31
answer_quality = quality_str ,
Original file line number Diff line number Diff line change 12
12
from onyx .agent_search .basic .graph_builder import basic_graph_builder
13
13
from onyx .agent_search .basic .states import BasicInput
14
14
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
17
17
from onyx .agent_search .shared_graph_utils .utils import get_test_config
18
18
from onyx .chat .llm_response_handler import LLMResponseHandlerManager
19
19
from onyx .chat .models import AgentAnswerPiece
34
34
from onyx .tools .tool_runner import ToolCallKickoff
35
35
from onyx .utils .logger import setup_logger
36
36
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
+
37
40
logger = setup_logger ()
38
41
39
42
_COMPILED_GRAPH : CompiledStateGraph | None = None
You can’t perform that action at this time.
0 commit comments