File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,16 @@ def intent_router(state: CustomsAgentState) -> CustomsAgentState:
1414 2. tariff_prediction: 관세 계산, 세율 문의, 관세 예측 관련
1515 3. qna: 일반적인 관세/통관 관련 질문, 법령 문의, 절차 안내
1616
17+ # 예시
18+ - "관세 예측해줘" → tariff_prediction
19+ - "관세 계산해줘" → tariff_prediction
20+ - "관세 알려줘" → tariff_prediction
21+ - "이 물건의 세금이 얼마나 나올까?" → tariff_prediction
22+ - "운송장 번호 123456 어디쯤이야?" → customs_tracking
23+ - "통관 진행 상황 알려줘" → customs_tracking
24+ - "관세청 전화번호 알려줘" → qna
25+ - "수입 절차가 궁금해" → qna
26+
1727 사용자 쿼리: {query}
1828
1929 반드시 다음 중 하나만 응답하세요: customs_tracking, tariff_prediction, qna
@@ -23,11 +33,11 @@ def intent_router(state: CustomsAgentState) -> CustomsAgentState:
2333 SystemMessage (content = classification_prompt .format (query = state ["query" ]))
2434 ])
2535
26- intent = result .content .strip ()
36+ intent = str ( result .content ) .strip ()
2737 if intent not in ["customs_tracking" , "tariff_prediction" , "qna" ]:
2838 intent = "qna" # 기본값
29-
30- state ["intent" ] = intent
39+ # 타입 힌트에 맞게 Literal로 제한
40+ state ["intent" ] = intent # type: ignore
3141 state ["messages" ].append (AIMessage (content = f"의도 분류 완료: { intent } " ))
32- print (state )
42+ print (state ) # type: ignore
3343 return state
You can’t perform that action at this time.
0 commit comments