We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1da185c commit 9c89113Copy full SHA for 9c89113
apps/application/flow/step_node/intent_node/impl/base_intent_node.py
@@ -191,7 +191,7 @@ def get_branch_by_id(category_id: int):
191
try:
192
classification_id = None
193
194
- # 如果返回长度小于5,先尝试解析为数字(增加自由度:自定义提示词模板时,可提示大模型只输出ID值)
+ # 如果返回长度小于5,先尝试解析为数字(增加自由度:自定义提示词模板时,可提示大模型只输出意图分类的ID值)
195
if len(result) < 5:
196
classification_id = self.to_int(result)
197
@@ -223,7 +223,7 @@ def parse_result_reason(self, result: str):
223
224
result_json = json.loads(result)
225
return result_json.get('reason', '')
226
- except Exception as e:
+ except Exception:
227
reason_patterns = [
228
r'"reason":\s*"([^"]*)"', # 标准格式
229
r'"reason":\s*"([^"]*)', # 缺少结束引号
0 commit comments