Skip to content

Commit 885e3f5

Browse files
committed
feat(graph) : PROFILE_EXTRACTION 노드 추가 사용자의 질문 특징을 정의된 유형에 따라 추출
1 parent b423bfc commit 885e3f5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

llm_utils/graph.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from llm_utils.chains import (
1212
query_refiner_chain,
1313
query_maker_chain,
14+
query_refiner_with_profile_chain,
1415
)
1516

1617
from llm_utils.tools import get_info_from_db
@@ -38,6 +39,17 @@ class QueryMakerState(TypedDict):
3839
device: str
3940

4041

42+
# 노드 함수: PROFILE_EXTRACTION 노드
43+
def profile_extraction_node(state: QueryMakerState):
44+
45+
result = query_refiner_with_profile_chain.invoke(
46+
{"question": state["messages"][0].content}
47+
)
48+
49+
state["question_profile"] = result
50+
return state
51+
52+
4153
# 노드 함수: QUERY_REFINER 노드
4254
def query_refiner_node(state: QueryMakerState):
4355
res = query_refiner_chain.invoke(

0 commit comments

Comments
 (0)