Skip to content

Commit f7b8784

Browse files
committed
graph_config 변수 값 받아올 수 있도록 수정
1 parent 34ce19f commit f7b8784

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

engine/query_executor.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
from utils.llm.graph_utils.enriched_graph import builder as enriched_builder
1515
from utils.llm.llm_response_parser import LLMResponseParser
1616

17+
import streamlit as st
18+
1719
logger = logging.getLogger(__name__)
1820

1921

@@ -24,7 +26,7 @@ def execute_query(
2426
retriever_name: str = "기본",
2527
top_n: int = 5,
2628
device: str = "cpu",
27-
use_enriched_graph: bool = False,
29+
use_enriched_graph: bool = st.session_state.get('graph_config', {}).get('preset') not in (None, '기본'),
2830
session_state: Optional[Union[Dict[str, Any], Any]] = None,
2931
) -> Dict[str, Any]:
3032
"""
@@ -49,7 +51,6 @@ def execute_query(
4951
- "messages": 전체 LLM 응답 메시지 목록
5052
- "searched_tables": 참조된 테이블 목록 등 추가 정보
5153
"""
52-
5354
logger.info("Processing query: %s", query)
5455

5556
# 그래프 선택
@@ -73,6 +74,7 @@ def execute_query(
7374
# CLI 환경: 매번 새로운 그래프 컴파일
7475
graph = graph_builder.compile()
7576

77+
7678
# 그래프 실행
7779
res = graph.invoke(
7880
input={

0 commit comments

Comments
 (0)