Skip to content

Commit 596485b

Browse files
小调整。
1 parent 5380ff3 commit 596485b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

apps/application/flow/step_node/intent_node/impl/base_intent_node.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def get_history_message(history_chat_record, dialogue_number):
126126
message.content = re.sub('<form_rander>[\d\D]*?<\/form_rander>', '', message.content)
127127
return history_message
128128

129-
def build_classification_prompt(self, prompt_template: str, user_input: str, branch: List[Dict], output_reason: bool) -> str:
129+
def build_classification_prompt(self, prompt_template: str, user_input: str, branch: List[Dict], reason_field: bool) -> str:
130130
"""构建分类提示词"""
131131

132132
classification_list = []
@@ -149,8 +149,8 @@ def build_classification_prompt(self, prompt_template: str, user_input: str, bra
149149
classification_id += 1
150150

151151
# 构建输出JSON结构
152-
output_reason = ',\n"reason": ""' if output_reason is True else ''
153-
output_json = f'{{\n"classificationId": 0{output_reason}\n}}'
152+
reason_field = ',\n"reason": ""' if reason_field is True else ''
153+
output_json = f'{{\n"classificationId": 0{reason_field}\n}}'
154154

155155
return (prompt_template or DEFAULT_PROMPT_TEMPLATE).format(
156156
classification_list=json.dumps(classification_list, ensure_ascii=False),

0 commit comments

Comments
 (0)