Skip to content

Commit c1af722

Browse files
committed
refactor: 통관진행조회 가능 여부 질문 시 필요한 파라미터를 안내하도록 수정
1 parent fb17197 commit c1af722

2 files changed

Lines changed: 10 additions & 8 deletions

File tree

core/customs_tracking/agent/customs_tracking_agent.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ def customs_tracking_agent(state: CustomsAgentState) -> CustomsAgentState:
1212
llm = get_llm()
1313

1414
prompt = ChatPromptTemplate.from_messages([
15-
("system", """
16-
당신은 통관 및 배송 추적 전문가입니다.
17-
사용할 수 있는 도구 목록이 아래 제공됩니다.
18-
19-
다음 사용자 쿼리를 분석하여 정확히 하나의 카테고리로 분류해주세요:
15+
("system", """ 당신은 통관 진행 조회 서비스를 사용자에게 직접 제공하는 관세청 도우미입니다.
16+
아래 도구를 통해 실제 통관 진행 정보를 조회할 수 있으므로, 가능한 경우에는 반드시 도구를 사용하여 답변하세요.
17+
18+
사용자의 질문이 화물번호나 BL 정보를 포함하지 않은 경우에는 다음 문장으로 안내하세요:
19+
"통관 진행을 조회하기 위해서는 화물번호 또는 BL 번호가 필요합니다. 화물번호(MT 번호) 또는 연도, MBL, HBL 번호를 제공해 주시면 통관 진행 정보를 조회해 드리겠습니다."
20+
21+
도구 목록:
2022
1. get_cargo_progress_details_by_mt: 화물번호를 통한 통관 진행 조회
2123
2. get_cargo_progress_details_by_bl: 연도, MBL, HBL 번호를 통한 통관 진행 조회
22-
23-
도구를 이용해 통관 상태를 확인하고, 호출 결과는 가공하지 말고 그대로 반환하세요.
2424
"""),
2525
MessagesPlaceholder(variable_name="messages"),
2626
("system", "{agent_scratchpad}"),
@@ -30,6 +30,7 @@ def customs_tracking_agent(state: CustomsAgentState) -> CustomsAgentState:
3030
tools=tools,
3131
prompt=prompt
3232
)
33+
print(prompt)
3334

3435
agent_executor = AgentExecutor(
3536
agent=agent,
@@ -56,6 +57,7 @@ def customs_tracking_agent(state: CustomsAgentState) -> CustomsAgentState:
5657

5758
state["final_response"] = ""
5859
else:
60+
print(result["output"])
5961
state["final_response"] = result["output"]
6062

6163
return state

core/graphs/workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def create_customs_graph():
3737
)
3838

3939
# 각 에이전트에서 final_agent로
40-
workflow.add_edge("customs_tracking", "final_agent")
40+
workflow.add_edge("customs_tracking", END)
4141
workflow.add_edge("tariff_prediction", "final_agent")
4242
workflow.add_edge("qna", "final_agent")
4343
# final_agent에서 종료점으로

0 commit comments

Comments
 (0)