Skip to content

Commit 9c89113

Browse files
小调整。
1 parent 1da185c commit 9c89113

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def get_branch_by_id(category_id: int):
191191
try:
192192
classification_id = None
193193

194-
# 如果返回长度小于5,先尝试解析为数字(增加自由度:自定义提示词模板时,可提示大模型只输出ID值
194+
# 如果返回长度小于5,先尝试解析为数字(增加自由度:自定义提示词模板时,可提示大模型只输出意图分类的ID值
195195
if len(result) < 5:
196196
classification_id = self.to_int(result)
197197

@@ -223,7 +223,7 @@ def parse_result_reason(self, result: str):
223223
try:
224224
result_json = json.loads(result)
225225
return result_json.get('reason', '')
226-
except Exception as e:
226+
except Exception:
227227
reason_patterns = [
228228
r'"reason":\s*"([^"]*)"', # 标准格式
229229
r'"reason":\s*"([^"]*)', # 缺少结束引号

0 commit comments

Comments
 (0)