Skip to content

Commit 3008455

Browse files
committed
pre-commit 으로 코드 정리 및 포맷팅 개선
1 parent 0075289 commit 3008455

File tree

7 files changed

+12
-6
lines changed

7 files changed

+12
-6
lines changed

interface/lang2sql.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ def should_show(_key: str) -> bool:
117117
st.write(f"적합성 통과 여부: `{passed}`")
118118
try:
119119
import json as _json
120-
st.code(_json.dumps(details, ensure_ascii=False, indent=2), language="json")
120+
121+
st.code(
122+
_json.dumps(details, ensure_ascii=False, indent=2), language="json"
123+
)
121124
except Exception:
122125
st.write(details)
123126

124-
125127
if should_show("show_token_usage"):
126128
st.markdown("---")
127129
token_summary = TokenUtils.get_token_usage_summary(data=res["messages"])

llm_utils/chains.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- Profile Extraction
88
- Question Gate (SQL 적합성 분류)
99
"""
10+
1011
import os
1112
from langchain_core.prompts import (
1213
ChatPromptTemplate,
@@ -29,6 +30,7 @@ class QuestionProfile(BaseModel):
2930
3031
이 프로파일은 이후 컨텍스트 보강 및 SQL 생성 시 힌트로 사용됩니다.
3132
"""
33+
3234
is_timeseries: bool = Field(description="시계열 분석 필요 여부")
3335
is_aggregation: bool = Field(description="집계 함수 필요 여부")
3436
has_filter: bool = Field(description="조건 필터 필요 여부")
@@ -126,4 +128,4 @@ def create_question_gate_chain(llm):
126128
query_maker_chain = create_query_maker_chain(llm)
127129
profile_extraction_chain = create_profile_extraction_chain(llm)
128130
query_enrichment_chain = create_query_enrichment_chain(llm)
129-
question_gate_chain = create_question_gate_chain(llm)
131+
question_gate_chain = create_question_gate_chain(llm)

llm_utils/graph_utils/base.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class QueryMakerState(TypedDict):
3636
device: str
3737
question_gate_result: dict
3838

39+
3940
# 노드 함수: QUESTION_GATE 노드
4041
def question_gate_node(state: QueryMakerState):
4142
"""

llm_utils/graph_utils/basic_graph.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@
2525
builder.add_node(GET_TABLE_INFO, get_table_info_node)
2626
builder.add_node(QUERY_MAKER, query_maker_node)
2727

28+
2829
def _route_after_gate(state: QueryMakerState):
2930
return GET_TABLE_INFO
3031

32+
3133
builder.add_conditional_edges(
3234
QUESTION_GATE,
3335
_route_after_gate,

llm_utils/graph_utils/enriched_graph.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,11 @@
3131
builder.add_node(CONTEXT_ENRICHMENT, context_enrichment_node)
3232
builder.add_node(QUERY_MAKER, query_maker_node)
3333

34+
3435
def _route_after_gate(state: QueryMakerState):
3536
return GET_TABLE_INFO
3637

38+
3739
builder.add_conditional_edges(
3840
QUESTION_GATE,
3941
_route_after_gate,

llm_utils/output_parser/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@
33
44
이 패키지는 LLM의 구조화 출력 모델과 파서들을 포함합니다.
55
"""
6-

llm_utils/output_parser/question_suitability.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,3 @@ class QuestionSuitability(BaseModel):
2121
requires_data_science: bool = Field(
2222
default=False, description="SQL을 넘어 ML/통계 분석이 필요한지 여부"
2323
)
24-
25-

0 commit comments

Comments
 (0)